/*
 * @Author: Sunday
 * @Date: 2020-10-09 14:50:02
 * @LastEditors: Sunday
 * @LastEditTime: 2020-10-09 14:50:02
 * @Description: file content
 */
var fun_name_arr = ['chart_line_1', 'chart_line_2', 'chart_line_3', 'chart_line_4', 'chart_line_5', 'chart_line_6', 'chart_line_7',
	'chart_bar_1', 'chart_bar_2', 'chart_bar_3', 'chart_bar_4', 'chart_bar_5', 'chart_bar_6', 'chart_bar_7', 'chart_bar_8', 'chart_bar_9', 'chart_bar_10', 'chart_bar_11', 'chart_bar_12', 'chart_bar_13', 'chart_bar_14', 'chart_bar_15', 'chart_bar_16', 'chart_bar_17', 'chart_bar_18', 'chart_bar_19',
	'chart_bar_20', 'chart_bar_21', 'chart_bar_22',
	'chart_pie_1', 'chart_pie_2', 'chart_pie_3', 'chart_pie_4', 'chart_pie_5', 'chart_pie_6', 'chart_pie_7', 'chart_pie_8',
	'chart_gauge_1', 'chart_gauge_2', 'chart_gauge_3', 'chart_gauge_4', 'chart_gauge_5', 'chart_gauge_6',
	'chart_water_1', 'chart_water_2',
	'chart_word_1', 'chart_word_2',
	'chart_radar_1',
	'chart_graph_1',
	'pie_3d_1', 'pie_3d_2',
	'chart_tree_1'
];

var chart_line_1 = function (pxdata, pydata, punit) {
	var mychart = echarts.init(document.getElementById('chart_line_1'));
	var xdata = pxdata || S_mock.xdata(1, 6, '月');
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var dw = punit || '公顷';
	//图表自定义配置部分
	var diy_opts = {
		xline_color: '#3196fa',
		yline_color: '#3196fa',
		yline_sp_color: '#3196fa',
		line_color: '#00FF4E',
		label_color: '#fff'
	};
	var option = {
		title: {
			show: true,
			text: '图表标题',
			x: 'center',
			textStyle: {
				color: '#fff',
				fontSize: getSize(.3),
				fontWeight: 'normal'
			}
		},
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			}
		},
		grid: { //直角坐标系
			top: '25%',
			left: '4%',
			right: '4%',
			bottom: '8%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			boundaryGap: true,
			margin: getSize(0.1),
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: diy_opts.xline_color
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.24),
					color: '#fff',
				},
			},
			axisTick: {
				show: false,
			},
			data: xdata,
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			name: '单位：' + dw,
			nameTextStyle: {
				fontSize: getSize(0.24),
				color: '#fff',
				padding: [0, getSize(0.3), 0, 0]
			},
			margin: getSize(0.1),
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					type: 'dashed',
					color: diy_opts.yline_sp_color
				}
			},
			axisLine: { //坐标轴轴线相关设置。
				show: true,
				lineStyle: {
					color: diy_opts.yline_color
				}
			},
			axisLabel: { //坐标轴刻度标签的相关设置。
				margin: 10, //刻度标签与轴线之间的距离。
				textStyle: {
					fontSize: getSize(0.24),
					color: '#fff',
				},
			},
			axisTick: { //坐标轴刻度相关设置。
				show: false,
			},
		}],
		series: {
			name: '', //系列名称
			type: 'line',
			smooth: false, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			symbolSize: 6, //标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: diy_opts.line_color, // 线条颜色
					shadowOffsetY: 0,
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: true,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: diy_opts.label_color,
					fontSize: getSize(0.3)
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: "#00FF4E",
				}
			},
			tooltip: { //提示框
				show: true
			},
			data: ydata
		}
	};
	mychart.setOption(option);
}

var chart_line_2 = function (pxdata, pydata1, pydata2, pydata3, punit) {
	var mychart = echarts.init(document.getElementById('chart_line_2'));
	var colorArr = ['#00E0FF', '#00E65A', '#EF4864'];
	var xdata = pxdata || S_mock.xdata(1, 8, '月');
	var ydata1 = pydata1 || S_mock.array(xdata.length, 200, 250);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 90, 190);
	var ydata3 = pydata3 || S_mock.array(xdata.length, 10, 80);
	var legend_arr = ["图例1", "图例2", "图例3"];
	var dw = punit || '个';
	var option = {
		color: colorArr,
		title: {
			show: false,
			text: '标题',
			left: 'center',
			textStyle: {
				color: '#fff',
				fontSize: getSize(.32),
				fontWeight: 'normal'
			}
		},
		tooltip: {
			trigger: 'axis'
		},
		grid: {
			left: '6%',
			right: '4%',
			bottom: '3%',
			containLabel: true
		},
		xAxis: {
			type: 'category',
			boundaryGap: true,
			margin: getSize(0.1),
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: '#3196fa'
				},
			},
			axisTick: {
				show: false
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.24),
					color: '#cccccc',
				},
			},
			data: xdata
		},
		yAxis: {
			type: 'value',
			name: '单位：' + dw,
			nameTextStyle: {
				fontSize: getSize(0.24),
				color: '#cccccc',
				padding: [0, getSize(0.3), 0, 0]
			},
			margin: getSize(0.1),
			splitNumber: 0,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					type: 'dashed',
					color: '#3196fa'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: '#3196fa'
				},
			},
			axisTick: {
				show: false
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.24),
					color: '#cccccc',
				},
			},
		},
		legend: {
			data: legend_arr,
			textStyle: {
				color: '#fff'
			},
			top: '10%',
			// icon: "roundRect", //  这个字段控制形状  类型包括 circle，rect ，roundRect，triangle，diamond，pin，arrow，none
			itemWidth: 10, // 设置宽度
			itemHeight: 10, // 设置高度
			itemGap: 5 // 设置间距
		},
		series: [{
				name: legend_arr[0],
				type: 'line',
				smooth: true,
				// stack: '总量',
				data: ydata1
			},
			{
				name: legend_arr[1],
				type: 'line',
				smooth: true,
				// stack: '总量',
				data: ydata2
			},
			{
				name: legend_arr[2],
				type: 'line',
				smooth: true,
				// stack: '总量',
				data: ydata3
			}
		]
	};
	mychart.setOption(option);
}

var chart_line_3 = function (pxdata, pdata1, pdata2, punit) {
	// 初始化实例
	var mychart = echarts.init(document.getElementById('chart_line_3'));
	var xdata = pxdata || S_mock.xdata(22, 31, '日');
	var ydata = pdata1 || S_mock.array(xdata.length, 100, 200);
	var ydata2 = pdata2 || S_mock.array(xdata.length, 100, 200);
	var colorArr = ['#00DEFE', '#00FF00'];
	var ynameArr = ['今日新增隔离', '今日解除隔离'];
	var legendArr = [];
	var dw = punit || '人';

	for (var key in ynameArr) {
		legendArr.push({
			name: ynameArr[key],
			textStyle: {
				color: '#fff'
			}
		})
	}
	var option = {
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			},
			formatter: '{a}</br>{b}:{c}万'

		},
		color: colorArr,
		grid: {
			left: '4%',
			top: "25%",
			right: '4%',
			bottom: '5%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			data: legendArr,
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			boundaryGap: true,
			axisLabel: {
				interval: 'auto',
				color: "#fff",
				fontSize: getSize(0.24),
			},

			axisLine: {
				show: true,
				lineStyle: {
					color: "#579dff",
				}
			},
			axisTick: {
				show: false,
			},
			data: xdata,
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '单位：' + dw,
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.24),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.24),
			},
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#579dff',
					opacity: 1,
					width: 1,
					type: 'dashed',
				}
			},

			axisLine: {
				show: true,
				lineStyle: {
					color: "#579dff",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: ynameArr[0], //系列名称
			type: 'line',
			smooth: false, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: "#1A9BA9", // 线条颜色
					shadowOffsetY: 2,
					shadowColor: '#0AA2C6',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: "#16D4F1",
					borderWidth: 1,
					borderColor: '#fff',
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(0, 222, 254, 1)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(0, 222, 254, 0.6)'
						},
						{
							offset: 1,
							color: 'rgba(0, 222, 254, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata
		}, {
			name: ynameArr[1], //系列名称
			type: 'line',
			smooth: false, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: "#00FF00", // 线条颜色
					shadowOffsetY: 1,
					shadowColor: '#0AD63E',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					borderWidth: 1,
					borderColor: '#fff',
					color: "#1DF01A",
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(1, 241, 8, 1)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(1, 241, 8, 0.6)'
						},
						{
							offset: 1,
							color: 'rgba(1, 241, 8, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata2
		}]
	};
	mychart.setOption(option);
}

var chart_line_4 = function (pxdata, pdata1, pdata2, pdata3) {
	// 初始化实例
	var myChart = echarts.init(document.getElementById('chart_line_4'));
	var xdata = pxdata || S_mock.xdata(20, 31, '日');
	var ydata = pdata1 || S_mock.array(xdata.length, 100, 200);
	var ydata2 = pdata2 || S_mock.array(xdata.length, 10, 100);
	var ydata3 = pdata3 || S_mock.array(xdata.length, 10, 100);
	var ynameArr = ['溶解氧', '水温', '叶绿素'];
	var legendArr = [];
	var color_arr = ['#65D3E8', '#76EAA5', '#F2D147']; //颜色数组

	for (var key in ynameArr) {
		legendArr.push({
			name: ynameArr[key],
			textStyle: {
				color: '#fff'
			}
		})
	}
	var option = {
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			},
			//formatter: '{a}</br>{b}:{c}'
		},
		grid: {
			left: '4%',
			top: "18%",
			right: '10%',
			bottom: '4%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			show: true,
			data: legendArr,
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			boundaryGap: false,
			axisLabel: {
				interval: 'auto',
				color: "#fff",
				fontSize: getSize(0.2),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#FFFFFF",
				}
			},
			axisTick: {
				show: false,
			},
			data: xdata,
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '（ug/m³）',
			position: "left",
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.18),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.2),
			},
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#FFFFFF',
					opacity: 0.5,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: color_arr[0],
				}
			},
			axisTick: {
				show: false
			},
		}, { //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '（°C）',
			position: "right",
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.18),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.2),
			},
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#FFFFFF',
					opacity: 0.5,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: color_arr[1],
				}
			},
			axisTick: {
				show: false
			},
		}, { //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '（mg/m³）',
			position: "right",
			offset: 50,
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.18),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.2),
			},
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#FFFFFF',
					opacity: 0.5,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: color_arr[2],
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: ynameArr[0], //系列名称
			yAxisIndex: 0,
			type: 'line',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: color_arr[0], // 线条颜色
					shadowOffsetY: 0,
					shadowColor: '#0AA2C6',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: color_arr[0],
					borderWidth: 1,
					borderColor: '#fff',
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(0, 240, 255, 0.4)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(0, 240, 255, 0.2)'
						},
						{
							offset: 1,
							color: 'rgba(0, 240, 255, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata
		}, {
			name: ynameArr[1], //系列名称
			yAxisIndex: 1,
			type: 'line',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: color_arr[1], // 线条颜色
					shadowOffsetY: 0,
					shadowColor: '#0AD63E',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					borderWidth: 1,
					borderColor: '#fff',
					color: color_arr[1],
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(118, 234, 165, 0.4)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(118, 234, 165, 0.2)'
						},
						{
							offset: 1,
							color: 'rgba(118, 234, 165, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata2
		}, {
			name: ynameArr[2], //系列名称
			yAxisIndex: 2,
			type: 'line',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			//showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: color_arr[2], // 线条颜色
					shadowOffsetY: 0,
					shadowColor: '#0AD63E',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					borderWidth: 1,
					borderColor: '#fff',
					color: color_arr[2],
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(242, 209, 71, 0.4)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(242, 209, 71, 0.2)'
						},
						{
							offset: 1,
							color: 'rgba(242, 209, 71, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata3
		}]
	};
	myChart.setOption(option);
}

var chart_line_5 = function (pxdata, pydata) {
	var mychart = echarts.init(document.getElementById('chart_line_5'));
	var xdata = pxdata || ['00:00', '03:00', '06:00', '09:00', '12:00', '15:00', '18:00', '21:00', '24:00'];
	var ydata = pydata || S_mock.array(xdata.length, 10, 20, true);
	var title = '昨日市一周边停车指数趋势';
	var max = Math.max.apply(null, ydata);
	var min = Math.min.apply(null, ydata);
	var seriesObj = {
		name: '', //系列名称
		type: 'line',
		smooth: true, //是否平滑曲线显示
		// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
		showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
		symbol: 'circle', //标记的图形。
		symbolSize: 6, //标记的大小
		lineStyle: { //线条样式。
			normal: {
				color: "#21CEE1", // 线条颜色
				shadowOffsetY: 0,
			},
		},
		markLine: {
			label: {
				show: true,
				// formatter: '',
				formatter: 'avg: {c}',
				position: 'end',
				padding: [-20, 0, 0, -60]
			},
			silent: true,
			symbol: 'none',
			data: [{
				name: '平均线',
				// 支持 'average', 'min', 'max'
				type: 'average'
			}]
		},
		itemStyle: { //折线拐点标志的样式。
			normal: {
				color: "#21CEE1",
			}
		},
		tooltip: { //提示框
			show: true
		},
		// data: dataArr
		data: function () {
			var itemArr = [],
				item;
			var max_index = ydata.indexOf(max);
			var min_index = ydata.indexOf(min);
			for (var i = 0; i < ydata.length; i++) {
				if (i == max_index) {
					item = {
						value: ydata[i],
						label: {
							show: true,
							position: 'insideLeft',
							// position: ['25%', '10%'],
							color: '#fff',
							formatter: '{b}\nmax:{c}',
							backgroundColor: 'rgba(1,60,119,0.86)',
							// zlevel:10
							padding: [5, 5, 5, 5]
						},
						itemStyle: { //折线拐点标志的样式。
							normal: {
								color: "#fff",
								borderColor: '#00f6ff',
								borderWidth: 3,
							}
						},
					};
				} else if (i == min_index) {
					item = {
						value: ydata[i],
						label: {
							show: true,
							position: 'insideLeft',
							color: '#fff',
							formatter: '{b}\nmin:{c}',
							backgroundColor: 'rgba(1,60,119,0.86)',
							padding: [5, 5, 5, 5]
						},
						itemStyle: { //折线拐点标志的样式。
							normal: {
								color: "#fff",
								borderColor: '#ffcc00',
								borderWidth: 3
							}
						},
					};
				} else {
					item = {
						value: ydata[i],
						label: {
							show: false,
							color: '#fff'
						},
						symbolSize: 0,
						itemStyle: {
							normal: {

							}
						}
					};
				}
				itemArr.push(item);
			}
			return itemArr;
		}()
	};
	var option = {
		title: {
			show: true,
			text: title,
			left: 'center',
			textStyle: {
				color: '#fff',
				fontSize: getSize(.26),
				fontWeight: 'normal'
			}
		},
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			}
		},
		grid: { //直角坐标系
			top: '35%',
			left: '5%',
			right: '4%',
			bottom: '8%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			boundaryGap: true,
			margin: getSize(0.1),
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: '#3196fa'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.2),
					color: '#fff',
				},
			},
			axisTick: {
				show: false,
			},
			data: xdata
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			name: '',
			nameTextStyle: {
				fontSize: getSize(0.2),
				color: '#fff',
				padding: [getSize(0.2), 0, 0, 0]
			},
			margin: getSize(0.1),
			splitNumber: 2,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					type: 'dashed',
					color: '#3196fa'
				}
			},
			axisLine: { //坐标轴轴线相关设置。
				show: true,
				lineStyle: {
					color: '#3196fa'
				}
			},
			axisLabel: { //坐标轴刻度标签的相关设置。
				margin: 10, //刻度标签与轴线之间的距离。
				textStyle: {
					fontSize: getSize(0.24),
					color: '#fff',
				},
			},
			axisTick: { //坐标轴刻度相关设置。
				show: false,
			},
		}],
		series: seriesObj
	};
	mychart.setOption(option);
}

var chart_line_6 = function (pxdata, pdata1, pdata2) {
	// 初始化实例
	var myChart = echarts.init(document.getElementById('chart_line_6'));
	var xdata = pxdata || S_mock.xdata(1, 12, '月');
	var ydata = pdata1 || S_mock.array(xdata.length, 30, 50);
	var ydata2 = pdata2 || S_mock.array(xdata.length, 20, 30);

	var ynameArr = ['任务数', '完成率'];
	var legendArr = [];
	var color_arr = ['#6FDD9E', '#60AEEE']; //颜色数组

	for (var key in ynameArr) {
		legendArr.push({
			name: ynameArr[key],
			textStyle: {
				color: '#fff'
			}
		})
	}
	var option = {
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			},
			//formatter: '{a}{b}:{c}'
		},
		grid: {
			left: '0%',
			top: "18%",
			right: '1%',
			bottom: '0%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			show: true,
			data: legendArr,
			icon: 'circle',
			y: getSize(0.3),
			itemWidth: getSize(0.24),
			itemHeight: getSize(0.24),
			itemGap: getSize(2),
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			boundaryGap: false,
			axisLabel: {
				interval: 'auto',
				color: "#fff",
				fontSize: getSize(0.24),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: 'rgba(49,150,250,0.9)',
				}
			},
			axisTick: {
				show: false,
			},
			data: xdata,
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '',
			position: "left",
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.28),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.28),

			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: 'rgba(49,150,250,0.9)',
					opacity: 0.5,
					width: 1,
					type: 'dotted',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: 'rgba(49,150,250,0.6)',
				}
			},
			axisTick: {
				show: false
			},
		}, { //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			max: 100,

			name: '',
			position: "right",
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.18),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.28),
				formatter: '{value}%'
			},
			// splitNumber : 20,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: 'rgba(49,150,250,0.6)',
					opacity: 0.5,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: color_arr[1],
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: ynameArr[0], //系列名称
			yAxisIndex: 0,
			type: 'line',
			symbol: 'none',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			//showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			//	symbol: 'circle', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: {
				normal: {
					width: 2,
					color: {
						type: 'linear',
						colorStops: [{
							offset: 0,
							color: '#fff' // 0% 处的颜色
						}, {
							offset: 0.2,
							color: '#6FDD9E' // 100% 处的颜色
						}, {
							offset: 0.4,
							color: '#fff' // 100% 处的颜色
						}, {
							offset: 0.6,
							color: '#6FDD9E' // 100% 处的颜色
						}, {
							offset: 0.8,
							color: '#fff' // 100% 处的颜色
						}, {
							offset: 1,
							color: '#6FDD9E' // 100% 处的颜色
						}],
						globalCoord: false // 缺省为 false
					},
					shadowColor: 'rgba(0,0,0, 0.5)',
					shadowBlur: 2,
					shadowOffsetY: 5
				}
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: color_arr[0],
					borderWidth: 10,
					// borderColor: '#fff',
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(95,174,238, 0.5)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(95,174,238, 0.12)'
						},
						{
							offset: 1,
							color: 'rgba(95,174,238, 0)'
						}
					], false),
					shadowColor: 'rgba(0,0,0, 0.4)', //阴影颜色
					shadowBlur: getSize(0.5) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata
		}, {
			name: ynameArr[1], //系列名称
			yAxisIndex: 1,
			type: 'line',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			//showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'none',
			// symbolSize: 2,//标记的大小
			lineStyle: {
				normal: {
					width: 2,
					color: {
						type: 'linear',
						colorStops: [{
							offset: 0,
							color: '#fff' // 0% 处的颜色
						}, {
							offset: 0.2,
							color: '#5FAEEE' // 100% 处的颜色
						}, {
							offset: 0.4,
							color: '#fff' // 100% 处的颜色
						}, {
							offset: 0.6,
							color: '#5FAEEE' // 100% 处的颜色
						}, {
							offset: 0.8,
							color: '#fff' // 100% 处的颜色
						}, {
							offset: 1,
							color: '#5FAEEE' // 100% 处的颜色
						}],
						globalCoord: false // 缺省为 false
					},
					shadowColor: 'rgba(0,0,0, 0.5)',
					shadowBlur: 2,
					shadowOffsetY: 5
				}
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					borderWidth: 10,
					borderColor: '#fff',
					color: color_arr[1],

				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(95,174,238, 0.5)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(95,174,238, 0.12)'
						},
						{
							offset: 1,
							color: 'rgba(95,174,238, 0)'
						}
					], false),
					shadowColor: 'rgba(0,0,0, 0.4)', //阴影颜色
					shadowBlur: getSize(0.5) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: ydata2
		}]
	};
	myChart.setOption(option);
}

var timer_line_7;
var chart_line_7 = function (pxdata, pdata1, pdata2, pdata3) {
	// 初始化实例
	var myChart = echarts.init(document.getElementById('chart_line_7'));
	var xdata = pxdata || S_mock.xdata(1, 12, '月');
	var ydata = pdata1 || S_mock.array(xdata.length, 100, 200);
	var ydata2 = pdata2 || S_mock.array(xdata.length, 10, 100);
	//分割数组
	var spArray = function (N, Q) {
		var R = [],
			F;
		var new_arr = [];
		for (F = 0; F < Q.length; F++) {
			if (F <= Q.length - N) {
				R.push(Q.slice(F, F + N))
			}
		}
		return R
	}
	var sp_xdata = spArray(5, xdata);
	var sp_ydata = spArray(5, ydata);
	var sp_ydata2 = spArray(5, ydata2);
	var sp_data_length = sp_xdata.length;
	var ynameArr = ['事项数', '耗时'];
	var legendArr = [];
	var color_arr = ['#00CCFF', '#00F3D5']; //颜色数组
	for (var key in ynameArr) {
		legendArr.push({
			name: ynameArr[key],
			textStyle: {
				color: '#fff',
				fontSize: getSize(0.28),
			}
		})
	}
	var option = {
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			},
			//formatter: '{a}{b}:{c}'
		},
		grid: {
			left: '4%',
			top: "20%",
			right: '4%',
			bottom: '4%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			show: true,
			top: '6%',
			icon: 'rect',
			itemGap: getSize(0.5),
			itemWidth: getSize(0.24),
			itemHeight: getSize(0.24),
			data: legendArr,
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			// boundaryGap: false,
			axisLabel: {
				rotate: 30,
				interval: 'auto',
				color: "rgba(255,255,255,0.7)",
				fontSize: getSize(0.32),
				margin: 15,
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#51A7F7",
					opacity: 0.3,
					type: 'dashed'
				}
			},
			axisTick: {
				show: false,
			},
			data: sp_xdata[0],
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '（件）',
			position: "left",
			nameTextStyle: {
				color: "rgba(255,255,255,0.7)",
				fontSize: getSize(0.28),
			},
			axisLabel: {
				interval: 0,
				color: "rgba(255,255,255,0.7)",
				fontSize: getSize(0.28),
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: "#51A7F7",
					opacity: 0.3,
					type: 'dashed'
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: color_arr[0],
				}
			},
			axisTick: {
				show: false
			},
		}, { //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			min: 0, //坐标轴刻度最小值。
			name: '（小时）',
			position: "right",
			nameTextStyle: {
				color: "rgba(255,255,255,0.7)",
				fontSize: getSize(0.28),
			},
			axisLabel: {
				interval: 0,
				color: "rgba(255,255,255,0.7)",
				fontSize: getSize(0.28),
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#FFFFFF',
					opacity: 0.5,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: color_arr[1],
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: ynameArr[0], //系列名称
			yAxisIndex: 0,
			type: 'line',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'rect', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: color_arr[0], // 线条颜色
					shadowOffsetY: 0,
					shadowColor: '#0AA2C6',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: color_arr[0],
					borderWidth: 0,
					borderColor: '#fff',
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(25, 176, 254, 0.4)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(25, 176, 254, 0.2)'
						},
						{
							offset: 1,
							color: 'rgba(25, 176, 254, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: sp_ydata[0]
		}, {
			name: ynameArr[1], //系列名称
			yAxisIndex: 1,
			type: 'line',
			smooth: true, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'rect', //标记的图形。
			// symbolSize: 2,//标记的大小
			lineStyle: { //线条样式。
				normal: {
					color: color_arr[1], // 线条颜色
					shadowOffsetY: 0,
					shadowColor: '#0AD63E',
				},
			},
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					borderWidth: 0,
					borderColor: '#fff',
					color: color_arr[1],
				}
			},
			tooltip: { //提示框
				show: true
			},
			areaStyle: { //区域填充样式
				normal: {
					//线性渐变，前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’，则该四个值是绝对像素位置。
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0, //// 0% 处的颜色
							color: 'rgba(0, 243, 213, 0.4)'
						}, {
							offset: 0.4, //// 0% 处的颜色
							color: 'rgba(0, 243, 213, 0.2)'
						},
						{
							offset: 1,
							color: 'rgba(0, 243, 213, 0)'
						}
					], false),
					shadowColor: '#177477', //阴影颜色
					shadowBlur: getSize(0.2) //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
				}
			},
			data: sp_ydata2[0]
		}]
	};
	myChart.setOption(option);
	auto_change_data(5000);
	myChart.resize();

	function auto_change_data(time) {
		clearInterval(timer_line_7);
		var idx = 0;
		timer_line_7 = setInterval(function () {
			if (idx == sp_data_length - 1) {
				idx = 0;
			} else {
				idx++;
			}
			option.xAxis[0].data = sp_xdata[idx];
			option.series[0].data = sp_ydata[idx];
			option.series[1].data = sp_ydata2[idx];
			myChart.setOption(option);
		}, time);
	}
	// 监听页面大小变化 同时对图表进行resize
	window.onresize = function () {
		myChart.resize();
	}
}

var chart_bar_1 = function (pxdata, pydata) {
	var myChart = echarts.init(document.getElementById('chart_bar_1'));
	var xdata = pxdata || S_mock.xdata(2016, 2019, '年');
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		grid: {
			left: '4%',
			top: "22%",
			right: '4%',
			bottom: '5%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#ccc",
				fontSize: getSize(0.2),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#579dff",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '单位：家',
			nameTextStyle: {
				color: "#ccc",
				fontSize: getSize(0.24),
			},
			axisLabel: {
				interval: 0,
				color: "#ccc",
				fontSize: getSize(0.24),
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#10447C',
					opacity: 1,
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#579dff",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			type: 'bar',
			barGap: 0,
			barWidth: "40%",
			label: {
				show: true,
				position: 'top',
				color: '#facc14'
			},

			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 0, 1, [{
								offset: 0,
								color: '#01F1FC'
							},
							{
								offset: 1,
								color: '#1B729E'
							}
						]
					)
				},
			},
			data: ydata
		}, ]
	};
	myChart.setOption(option);
}

var chart_bar_2 = function (pxdata, pydata) {
	var mychart = echarts.init(document.getElementById('chart_bar_2'));
	var rankArr = [7, 3, 4, 3, 6, 6, 5, 4, 1, 1];
	var placeHolderArr = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
	var labelArr = pydata || [96.22, 95, 96.0, 98.9, 97.95, 99.74, 95, 99.69, 100, 100];
	var xArr = pxdata || ['项目1', '项目2', '项目3', '项目4', '项目5', '项目6', '项目7', '项目8', '项目9', '项目10'];
	var seriesObj = [{
			name: '排名', //系列名称
			type: 'line',
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: true,
				formatter: function (para) {
					return '第' + rankArr[para.dataIndex] + '名';
				},
				position: 'bottom',
				textStyle: {
					padding: [-getSize(1.5), 0, 0, 0],
					fontSize: getSize(0.18),
					color: '#fff',
				}
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: 'rgba(49,149,249,1)'
				}
			},
			data: placeHolderArr,
			z: 100,
			silent: true,
			tooltip: { //提示框组件
				show: false
			}
		}, {
			name: '当月得分', //系列名称
			type: 'bar',
			barWidth: '25%',
			stack: 'one',
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: true,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					fontSize: getSize(0.36),
					color: '#facc14',
				}
			},
			itemStyle: { //折线拐点标志的样式。                
				normal: {
					color: 'rgba(49,150,250,1)'
				}
			},
			data: labelArr
		},
		{
			name: '考核目标值', //系列名称
			type: 'line',
			smooth: false, //是否平滑曲线显示
			// 			symbol:'circle',  // 默认是空心圆（中间是白色的），改成实心圆
			showAllSymbol: true, //只在主轴为类目轴（axis.type 为 'category'）时有效
			symbol: 'circle', //标记的图形。
			symbolSize: 0, //标记的大小
			label: { //图形上的文本标签，可用于说明图形的一些数据信息，比如值，名称等
				show: false,
				formatter: '{c}',
				position: 'top',
				textStyle: {
					fontSize: getSize(0.36),
					color: '#facc14',
				}
			},
			itemStyle: { //折线拐点标志的样式。                
				normal: {
					color: 'rgba(0,255,0,0.8)'
				}
			},
			data: labelArr
		}
	];
	var option = {
		tooltip: { //提示框组件
			show: true,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow'
			}
		},
		legend: {
			show: true,
			itemWidth: getSize(0.4),
			itemHeight: getSize(0.2),
			textStyle: {
				fontSize: getSize(0.24),
				color: '#fff',
			}
		},
		grid: { //直角坐标系
			top: '30%',
			left: '4%',
			right: '4%',
			bottom: '10%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		xAxis: [{ //直角坐标系 grid 中的 x 轴
			type: 'category', //类目轴，适用于离散的类目数据，为该类型时必须通过 data 设置类目数据。
			boundaryGap: true,
			margin: getSize(0.1),
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: '#3196fa'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.2),
					color: '#fff',
				},
			},
			axisTick: {
				show: false,
			},
			data: xArr,
		}],
		yAxis: [{ //直角坐标系 grid 中的 y 轴
			type: 'value', ////直角坐标系 grid 中的 x 轴
			// name: '单位：万人',
			// nameTextStyle: {
			//     fontSize: getSize(0.24),
			//     color: '#cccccc',
			//     padding: [0, getSize(0.3), 0, 0]
			// },
			// minInterval: 15,
			// margin: getSize(0.1),
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					type: 'dashed',
					color: 'rgba(27,92,155,1)'
				}
			},
			axisLine: { //坐标轴轴线相关设置。
				show: false,
				lineStyle: {
					color: 'rgba(27,92,155,1)'
				}
			},
			axisLabel: { //坐标轴刻度标签的相关设置。
				show: false,
				margin: 10, //刻度标签与轴线之间的距离。
				textStyle: {
					color: '#cccccc',
				},
			},
			axisTick: { //坐标轴刻度相关设置。
				show: false,
			},
		}],
		series: seriesObj
	};
	mychart.setOption(option);
}

var chart_bar_3 = function (pxdata, pydata1, pydata2, pydata3) {
	var myChart = echarts.init(document.getElementById('chart_bar_3'));
	var xdata = pxdata || ['省', '市', '区(县)'];
	var ydata = pydata1 || S_mock.array(xdata.length, 20, 30);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 15, 20);
	var ydata3 = pydata3 || S_mock.array(xdata.length, 15, 20);
	var color_arr = ['#00C5FF', '#00F527', '#FAB101'];
	var legend_arr = ['h机', 'b机', '8705'];
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color: color_arr,
		title: {
			text: '当前省市县h机b机8705用户数量',
			x: 'center',
			// top:'top',
			textStyle: {
				color: '#fff',
				fontSize: getSize(0.28),
				fontWeight: 'normal'
			}
		},
		grid: {
			left: '4%',
			top: "44%",
			right: '4%',
			bottom: '0%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			top: '12%',
			icon: 'roundRect',
			textStyle: {
				color: "#fff",
				fontSize: getSize(0.25)
			},
			data: legend_arr
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.28),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#02BDCC",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '(台)',
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.28),
				padding: [0, 0, 0, getSize(-0.6)]
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.28),
			},
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#056C76',
					opacity: 1,
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#02BDCC",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: legend_arr[0],
			type: 'bar',
			barGap: '50%',
			barWidth: "10%",
			label: {
				show: false,
				position: 'top',
				color: '#facc14'
			},
			itemStyle: {
				barBorderRadius: [5, 5, 0, 0]
			},
			data: ydata
		}, {
			name: legend_arr[1],
			type: 'bar',
			barGap: '50%',
			barWidth: "10%",
			label: {
				show: false,
				position: 'top',
				color: '#facc14'
			},
			itemStyle: {
				barBorderRadius: [5, 5, 0, 0]
			},
			data: ydata2
		}, {
			name: legend_arr[2],
			type: 'bar',
			barGap: '50%',
			barWidth: "10%",
			label: {
				show: false,
				position: 'top',
				color: '#facc14'
			},
			itemStyle: {
				barBorderRadius: [5, 5, 0, 0]
			},
			data: ydata3
		}]
	};
	myChart.setOption(option);
}

var chart_bar_4 = function (pxdata, pydata1, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_4'));
	var xdata = pxdata || S_mock.xdata(1, 4, '月');
	var ydata = pydata1 || S_mock.array(xdata.length, 100, 200);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 100, 200);
	var legend_arr = ['计划投资', '实际投资'];
	var option = {
		// backgroundColor: '#000922',
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color: ['#0683F2', '#BA8E26', '#2DE799'],
		grid: {
			left: '4%',
			top: "22%",
			right: '4%',
			bottom: '5%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			icon: 'rect',
			textStyle: {
				color: "#fff",
				fontSize: getSize(0.25)
			},
			data: legend_arr
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#ccc",
				fontSize: getSize(0.3),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#3087B1",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '单位：万元',
			nameTextStyle: {
				color: "#ccc",
				fontSize: getSize(0.24),
			},
			axisLabel: {
				interval: 0,
				color: "#ccc",
				fontSize: getSize(0.24),
			},
			splitNumber: 5,
			splitLine: {
				show: true,
				lineStyle: {
					color: '#151C41',
					width: 0.5,
					type: 'dashed'
				}
			},
			axisLine: {
				lineStyle: {
					color: '#151C41',
					width: 1 //这里是为了突出显示加上的
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: legend_arr[0],
			type: 'pictorialBar',
			barCategoryGap: '0%',
			barWidth: "20%",
			barGap: '10%',
			// symbol: 'triangle',
			symbol: 'image://./assets/img/bar1.png',
			symbolSize: ['100%', '100%'],
			symbolRepeat: false,
			label: {
				show: false,
				position: 'top',
				distance: 15,
				color: '#DB5E6A',
				fontWeight: 'bolder',
				fontSize: 20,
			},
			data: ydata,
			z: 10
		}, {
			name: legend_arr[1],
			type: 'pictorialBar',
			barCategoryGap: '0%',
			barWidth: "20%",
			barGap: '10%',
			// symbol: 'triangle',
			symbol: 'image://./assets/img/bar2.png',
			symbolSize: ['100%', '100%'],
			symbolRepeat: false,
			label: {
				show: false,
				position: 'top',
				distance: 15,
				color: '#DB5E6A',
				fontWeight: 'bolder',
				fontSize: 20,
			},
			data: ydata2,
			z: 10
		}]
	};
	myChart.setOption(option);
}

var chart_bar_5 = function (pxdata, pydata, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_5'));
	var xdata = pxdata || ['2016', '2017', '2018'];
	var ydata = pydata || [93.07, 94.85, 94.87];
	var ydata2 = pydata2 || [80, 60, 40];
	var myoption = {
		color: ['#3398DB'],
		// tooltip : {
		//     trigger: 'axis',
		//     axisPointer : {            // 坐标轴指示器，坐标轴触发有效
		//         type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
		//     }
		// },
		grid: {
			left: '0%',
			right: '3%',
			bottom: '3%',
			containLabel: true
		},
		xAxis: [{
			type: 'category',
			boundaryGap: true,
			data: xdata,
			axisLabel: {
				show: true,
				textStyle: {
					color: '#fff'
				}
			},
			axisLine: {
				lineStyle: {
					color: '#3196fa'
				}
			},
			splitLine: {
				show: false
			},
			axisTick: {
				show: false
			}
		}],
		yAxis: [{
			name: '综合得分',
			show: true,
			type: 'value',
			max: 100,
			min: 0,
			nameTextStyle: {
				color: '#fff'
			},
			splitLine: {
				show: false
			},
			axisLine: {
				lineStyle: {
					color: '#3196fa'
				}
			},
			axisLabel: {
				show: true,
				textStyle: {
					color: '#fff'
				}
			},
			axisTick: {
				show: false
			}
		}, {
			type: 'value',

			name: '综合排名',
			nameTextStyle: {
				color: '#fff'
			},
			axisLine: {
				lineStyle: {
					color: '#3196fa'
				}
			},
			splitLine: {
				show: true,
				lineStyle: {
					type: 'dashed',
					width: 1,
					color: '#3196fa'
				}
			},
			axisLabel: {
				show: true,
				textStyle: {
					color: '#fff'
				}
			},
			axisTick: {
				show: false
			},
			max: 10,
			min: 0,
		}],
		series: [{
			name: '综合得分',
			type: 'bar',
			barWidth: '25%',
			label: {
				show: true,
				position: 'top',
				color: '#fff',
				borderColor: '#3093f6',
				borderWidth: 1,
				backgroundColor: 'rgba(49,150,250,0.15)',
				padding: 5,
				formatter: function (params) {
					return params.value + '分' + '\n第' + parseInt(params.dataIndex + 1) + '名';
				}
			},
			data: ydata,
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 0, 1, [{
								offset: 0,
								color: '#188df0'
							},
							{
								offset: 0.5,
								color: '#188df0'
							},
							{
								offset: 1,
								color: 'transparent'
							}
						]
					)
				},
			},
		}, {
			name: '综合排名',
			type: 'line',
			data: ydata2,
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 0, 1, [{
								offset: 0,
								color: '#00c8cf'
							},
							{
								offset: 0.5,
								color: '#00c8cf'
							},
							{
								offset: 1,
								color: '#00c8cf'
							}
						]
					)
				},
			},
		}]
	};
	myChart.setOption(myoption);
}

var chart_bar_6 = function (pxdata, pydata) {
	var mychart = echarts.init(document.getElementById('chart_bar_6'));
	var xdata = pxdata || S_mock.xdata(1, 8, '月');
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var option = {
		tooltip: {
			trigger: 'axis',
		},
		grid: {
			top: '5%',
			left: '3%',
			right: '15%',
			bottom: '0%',
			containLabel: true
		},
		xAxis: {
			show: false,
			type: 'value',
			boundaryGap: [0, 0.01]
		},
		yAxis: {
			type: 'category',
			data: xdata,
			axisTick: {
				show: false
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#02575C",
				}
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.3),
					color: '#fff',
				},
			},
			inverse: true,
		},
		series: [{
			name: '',
			type: 'bar',
			label: {
				show: true,
				position: 'right',
				// formatter: '{c}件',
				formatter: function (para) {
					var pct = ((ydata[xdata.indexOf(para.name)] / getArrSum(ydata)) * 100).toFixed(2);
					return pct + '%  ' + para.data + '件'
				},
				color: '#14D7C1',
				fontSize: getSize(0.35)
			},
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 1, 0, [{
								offset: 0,
								color: 'rgba(26, 92, 142, 0.16)'
							},
							{
								offset: 1,
								color: 'rgba(19, 218, 195, 1)'
							}
						]
					),
					barBorderRadius: [0, 8, 8, 0]
				},
			},
			barWidth: '35%',
			data: ydata
		}, ]
	};
	mychart.clear();
	mychart.setOption(option);
}

var chart_bar_7 = function (pxdata, pydata, punit) {
	var myChart = echarts.init(document.getElementById('chart_bar_7'));
	var xdata = pxdata || ["种子轮企业", "天使轮企业", "A轮企业", "B轮企业", "C轮企业", "D轮企业", "E及以上轮企业"];
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var dw = punit || '家';
	var total = 0;
	for (var i = 0; i < ydata.length; i++) {
		total += ydata[i];
	}
	var option = {
		grid: {
			top: '8%',
			bottom: '8%',
			left: '5%',
			right: '7%',
			containLabel: true,
		},
		tooltip: {
			trigger: 'axis',
			axisPointer: {
				type: 'shadow',
				lineStyle: {
					color: '#39627d'
				}
			},
			formatter: '{b} {c}' + dw
		},
		yAxis: [{
			type: 'category',
			zlevel: 1,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#6b85a3'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: '#00ffff'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				fontSize: getSize(0.28),
				color: '#fff',
			},
			axisTick: {
				show: false,
			},
			inverse: true,
			data: xdata
		}, {
			type: 'category',
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#6b85a3'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: false,
				lineStyle: {
					color: '#00ffff'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				fontSize: getSize(0.28),
				formatter: function (para) {
					var value = ydata[xdata.indexOf(para)];
					var percent = (value / total * 100).toFixed(0) + '%';
					return value + dw + '  ' + percent;
				},
				color: '#fff',
			},
			axisTick: {
				show: false,
			},
			inverse: true,
			data: xdata
		}],
		xAxis: [{
			type: 'value',
			boundaryGap: true,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#6b85a3'
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: '#fff'
				},
			},
			axisLabel: {
				show: false,
				color: '#fff',
			},
			axisTick: {
				show: false,
			},
		}],
		series: [{
			name: '',
			type: 'bar',
			barGap: 0,
			barWidth: '30%',
			label: {
				show: true,
				position: 'insideRight',
				// formatter: '{c}件',
				formatter: function (para) {
					var pct = (ydata[xdata.indexOf(para.name)] / getArrSum(ydata) * 100).toFixed(2);
					return pct + '%  '
				},
				color: '#fff',
				fontSize: getSize(0.2)
			},
			itemStyle: {
				barBorderRadius: getSize(0.05),
				color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
						offset: 0, //// 0% 处的颜色
						color: 'rgba(49,150,250,0.1)'
					},
					{
						offset: 1,
						color: 'rgba(49,150,250,1)'
					}
				], false),
			},
			data: ydata
		}]
	};
	myChart.setOption(option);
}

var chart_bar_8 = function (pxdata, pydata) {
	var myChart = echarts.init(document.getElementById('chart_bar_8'));
	var xdata = pxdata || S_mock.xdata(1, 6, '月');
	var ydata = pydata || S_mock.array(xdata.length, 50, 80);
	var option = {
		// backgroundColor: '#000922',
		grid: {
			left: '12%',
			top: '5%',
			bottom: '12%',
			right: '8%'
		},
		tooltip: {
			show: true,
			formatter: function (params) {
				var val = params.value;
				return '关注度：' + val + '<br />批示：' + val + '%'
			}
		},
		xAxis: {
			data: xdata,
			axisTick: {
				show: false
			},
			axisLine: {
				lineStyle: {
					color: '#3087B1',
					width: 1 //这里是为了突出显示加上的
				}
			},
			axisLabel: {
				textStyle: {
					color: '#fff',
					fontSize: 12
				}
			}
		},
		yAxis: [{
			splitNumber: 3,
			axisTick: {
				show: false
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: '#3196fa',
					width: 1 //这里是为了突出显示加上的
				}
			},
			axisLabel: {
				formatter: '{value} %',
				textStyle: {
					color: '#fff'
				}
			},
			splitArea: {
				areaStyle: {
					color: 'rgba(255,255,255,.5)'
				}
			},
			splitLine: {
				show: true,
				lineStyle: {
					color: '#ccc',
					width: 0.5,
					type: 'dashed'
				}
			},
			max: 100
		}, {
			type: 'value',
			splitNumber: 3,
			axisTick: {
				show: false
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: '#3196fa',
					width: 1 //这里是为了突出显示加上的
				}
			},
			axisLabel: {
				textStyle: {
					color: '#fff'
				}
			},
			splitArea: {
				areaStyle: {
					color: 'rgba(255,255,255,.5)'
				}
			},
			splitLine: {
				show: false,
				lineStyle: {
					color: '#151C41',
					width: 1,
					type: 'dashed'
				}
			},
			min: 0,
			max: 100
		}],
		series: [{
			name: 'hill',
			type: 'pictorialBar',
			barCategoryGap: '0%',
			// symbol: 'triangle',
			symbol: 'path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z',
			label: {
				show: false,
				position: 'top',
				distance: 15,
				color: '#DB5E6A',
				fontWeight: 'bolder',
				fontSize: 20,
			},
			itemStyle: {
				normal: {
					color: {
						type: 'linear',
						x: 0,
						y: 0,
						x2: 0,
						y2: 1,
						colorStops: [{
								offset: 0,
								color: 'rgba(0, 125, 253, 0.8)' //  0%  处的颜色
							},
							{
								offset: 1,
								color: 'rgba(0, 125, 253, .1)' //  100%  处的颜色
							}
						],
						global: false //  缺省为  false
					}
				},
				emphasis: {
					opacity: 1
				}
			},
			data: ydata,
			z: 10
		}]
	};
	myChart.setOption(option);
}

var chart_bar_9 = function (pxdata, pydata1, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_9'));
	var xdata = pxdata || S_mock.xdata(2015, 2019, '年');
	var ydata = pydata1 || S_mock.array(xdata.length, 30, 35);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 20, 30);
	var legend_arr = ['项目数', '金额'];
	var color_arr = ['#00C5FF', '#00FCFF'];
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color: color_arr,
		grid: {
			left: '4%',
			top: "22%",
			right: '4%',
			bottom: '5%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			// icon: 'rect',
			textStyle: {
				color: "#fff",
				fontSize: getSize(0.25)
			},
			data: legend_arr
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#AAECFF",
				fontSize: getSize(0.24),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#02BDCC",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '(个)',
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.28),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.28),
			},
			splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#076B74',
					opacity: 1,
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#02BDCC",
				}
			},
			axisTick: {
				show: false
			},
		}, {
			type: 'value',
			name: '(万元)',
			nameTextStyle: {
				color: '#fff',
				fontSize: getSize(0.28),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: '#02BDCC'
				}
			},
			splitNumber: 3,
			splitLine: {
				show: false,
				lineStyle: {
					type: 'dashed',
					width: 1,
					color: '#076B74'
				}
			},
			axisLabel: {
				show: true,
				textStyle: {
					color: '#fff',
					fontSize: getSize(0.28)
				}
			},
			axisTick: {
				show: false
			}
		}],
		series: [{
			name: legend_arr[0],
			type: 'bar',
			barGap: 0,
			barWidth: "20%",
			label: {
				show: false,
				position: 'top',
				color: '#facc14'
			},
			data: ydata
		}, {
			name: legend_arr[1],
			type: 'line',
			yAxisIndex: 1,
			barGap: 0.1,
			barWidth: "20%",
			// stack:'1',
			symbol: 'emptyCircle',
			symbolSize: 10,
			label: {
				show: false,
				position: 'top',
				color: '#facc14'
			},
			// z:1,
			data: ydata2
		}]
	};
	myChart.setOption(option);
}

var chart_bar_10 = function (pxdata, pydata, pydata2) {
	var mychart = echarts.init(document.getElementById('chart_bar_10'));
	var xdata = pxdata || ['富春街道', '银湖街道', '东洲街道', '新登镇', '新登镇'];
	var dataArr = pydata || S_mock.array(xdata.length, 100, 200);
	var dataArr2 = pydata2 || S_mock.array(xdata.length, 100, 200);
	var legend_arr = ['当月承办', '去年同期承办'];
	var option = {
		tooltip: {
			trigger: 'axis',
			formatter: '{b}: <br /> {a0}:{c0}件<br />{a1}:{c1}件'
		},
		legend: {
			icon: 'roundRect',
			y: 6,
			textStyle: {
				color: '#fff',
				fontSize: getSize(0.24)
			},
			data: legend_arr
		},
		grid: {
			top: '16%',
			left: '1%',
			right: '15%',
			bottom: '2%',
			containLabel: true
		},
		xAxis: {
			name: '单位：件',
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.21),
			},
			position: 'top',
			show: true,
			type: 'value',
			boundaryGap: [0, 0.01],
			axisTick: {
				show: false
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#3196FA",
				}
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.21),
					color: '#fff',
				},
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#3196FA',
					opacity: 0.15,
					width: 1,
					type: 'dashed',
				}
			},
		},
		yAxis: {
			type: 'category',
			data: xdata,
			axisTick: {
				show: false
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#3196FA",
				}
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				textStyle: {
					fontSize: getSize(0.24),
					color: '#fff',
				},
			},
			inverse: true,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#3196FA',
					opacity: 0.15,
					width: 1,
					type: 'dashed',
				}
			},
		},
		series: [{
			name: legend_arr[0],
			type: 'bar',
			label: {
				show: false,
				position: 'right',
				// formatter: '{c}件',
				formatter: function (para) {
					var pct = ((dataArr[xdata.indexOf(para.name)] / getArrSum(dataArr)) * 100).toFixed(2);
					return pct + '%  ' + para.data + '件'
				},
				color: '#14D7C1',
				fontSize: getSize(0.35)
			},
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 1, 0, [{
								offset: 0,
								color: 'rgba(255,180,0,0)'
							},
							{
								offset: 1,
								color: 'rgba(255,180,0,1)'
							}
						]
					),
					barBorderRadius: [0, 8, 8, 0]
				},
			},
			barWidth: '30%',
			data: dataArr
		}, {
			name: legend_arr[1],
			type: 'bar',
			label: {
				show: false,
				position: 'right',
				// formatter: '{c}件',
				formatter: function (para) {
					var pct = ((dataArr[xdata.indexOf(para.name)] / getArrSum(dataArr)) * 100).toFixed(2);
					return pct + '%  ' + para.data + '件'
				},
				color: '#14D7C1',
				fontSize: getSize(0.35)
			},
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 1, 0, [{
								offset: 0,
								color: 'rgba(0,130,255,0)'
							},
							{
								offset: 1,
								color: 'rgba(0,130,255,1)'
							}
						]
					),
					barBorderRadius: [0, 8, 8, 0]
				},
			},
			barWidth: '30%',
			data: dataArr2
		}, ]
	};
	mychart.clear();
	mychart.setOption(option);
}

var chart_bar_11 = function (pxdata, pydata) {
	var myChart = echarts.init(document.getElementById('chart_bar_11'));
	var xdata = pxdata || ['省直', '杭州', '宁波', '温州', '绍兴', '丽水', '金华', '湖州', '绍兴', '台州', '衢州', '舟山'];
	var ydata = pydata || S_mock.array(xdata.length, 60, 90);
	var ydata_cov = [];
	for (var key in ydata) {
		if (ydata[key] < 80) {
			ydata_cov.push({
				value: ydata[key],
				label: {
					show: true,
					position: 'top',
					color: '#FFF',
					fontFamily: 'DIN Medium'
				},
				itemStyle: {
					normal: {
						barBorderRadius: [8, 8, 0, 0],
						color: new echarts.graphic.LinearGradient(
							0, 0, 0, 1, [{
									offset: 0,
									color: 'rgba(0,210,254,1)'
								},
								{
									offset: 1,
									color: 'rgba(1,209,254,0)'
								}
							]
						)
					},
				},
			})
		} else {
			ydata_cov.push({
				value: ydata[key],
				label: {
					show: true,
					position: 'top',
					color: '#FFF000',
					fontFamily: 'DIN Medium'
				},
				itemStyle: {
					normal: {
						barBorderRadius: [8, 8, 0, 0],
						color: new echarts.graphic.LinearGradient(
							0, 0, 0, 1, [{
									offset: 0,
									color: 'rgba(1,255,180,1)'
								},
								{
									offset: 1,
									color: 'rgba(1,209,254,0)'
								}
							]
						)
					},
				},
			})
		}
	}
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		grid: {
			left: '2%',
			top: "15%",
			right: '2%',
			bottom: '2%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.24),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#579DFF",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			//show: false,
			type: 'value',
			name: '',
			nameTextStyle: {
				color: "#ccc",
				fontSize: getSize(0.24),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.34),
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#3196FA',
					opacity: 0.41,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#579DFF",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			type: 'bar',
			barGap: 0,
			barWidth: "30%",
			data: ydata_cov
		}, ]
	};
	myChart.setOption(option);
}

var chart_bar_12 = function (pxdata, pydata1, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_12'));
	var xdata = pxdata || ['最高', '最低', '均值'];
	var ydata = pydata1 || [97.419, 87.354, 93.032];
	var ydata2 = pydata2 || [99.44, 97.27, 98.54];
	var legend_arr = ['得分', '满意率'];
	//var color_arr = ['#00C5FF', '#5699D4'];
	var ydata_cov = [];
	for (var key in ydata) {
		if (key == 0) {
			ydata_cov.push({
				value: ydata[key],
				itemStyle: { //折线拐点标志的样式。                
					normal: {
						color: 'red'
					}
				},
			});
		} else if (key == 1) {
			ydata_cov.push({
				value: ydata[key],
				itemStyle: { //折线拐点标志的样式。                
					normal: {
						color: 'gray'
					}
				},
			});
		} else {
			ydata_cov.push({
				value: ydata[key],
				itemStyle: { //折线拐点标志的样式。                
					normal: {
						color: 'orange'
					}
				},
			});
		}
	}
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		title: {
			show: true,
			text: '全市总体情况',
			x: 'center',
			y: '4%',
			textStyle: { //主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
				fontSize: 14,
				color: '#fff',
				fontStyle: 'normal',
				fontWeight: 'normal',
			},
		},
		//color: color_arr,
		grid: {
			left: '4%',
			top: "25%",
			right: '4%',
			bottom: '12%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			// icon: 'rect',
			bottom: '2%',
			textStyle: {
				color: "#fff",
				fontSize: 14
			},
			data: legend_arr
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: 14,
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "gray",
					opacity: 0.6,
					width: 1,
					type: 'solid',
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '',
			min: 0,
			max: 100,
			nameTextStyle: {
				color: "#fff",
				fontSize: 14,
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: 14,
			},
			//splitNumber: 3,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: 'gray',
					opacity: 0.6,
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#fff",
					opacity: 0.6,
					width: 1,
					type: 'solid',
				}
			},
			axisTick: {
				show: false
			},
		}, {
			show: false
		}],
		series: [{
			name: legend_arr[0],
			type: 'bar',
			barGap: 0,
			barWidth: "15%",
			label: {
				show: true,
				position: 'inside',
				fontSize: 14,
				color: '#fff'
			},
			data: ydata_cov,
		}, {
			name: legend_arr[1],
			type: 'line',
			yAxisIndex: 1,
			barGap: 0.1,
			barWidth: "20%",
			// stack:'1',
			symbol: 'emptyCircle',
			symbolSize: 6,
			label: {
				show: true,
				position: 'top',
				fontSize: 14,
				color: '#fff',
				formatter: '{c}%'
			},
			itemStyle: { //折线拐点标志的样式。
				normal: {
					color: "#5699D4",
				}
			},
			// z:1,
			data: ydata2
		}]
	};
	myChart.setOption(option);
};

var timer_bar_13;
var chart_bar_13 = function (pxdata, pydata) {
	var myChart = echarts.init(document.getElementById('chart_bar_13'));
	var xdata = pxdata || S_mock.xdata(1, 28, '社会团体');
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	//分割数组
	var spArray = function (N, Q) {
		var R = [],
			F;
		var new_arr = [];
		for (F = 0; F < Q.length;) {
			R.push(Q.slice(F, F += N))
		}
		return R
	}
	var sp_xdata = spArray(7, xdata);
	var sp_ydata = spArray(7, ydata);
	var sp_data_length = sp_xdata.length;
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		dataZoom: [{
			type: 'inside',
			yAxisIndex: [0],
			start: 0,
		}],
		grid: {
			left: '4%',
			top: "10%",
			right: '6%',
			bottom: '5%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			axisLabel: {
				interval: 0,
				color: "#eee",
				fontSize: getSize(0.3),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#0072fe",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
			data: sp_xdata[0]
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '',
			nameTextStyle: {
				color: "#eee",
				fontSize: getSize(0.3),
			},
			axisLabel: {
				interval: 0,
				color: "#eee",
				fontSize: getSize(0.3),
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#0072fe',
					opacity: 1,
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#0072fe",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			type: 'bar',
			barGap: 0,
			barWidth: getSize(0.55),
			label: {
				show: true,
				position: 'top',
				color: '#eee',
				formatter: '{c}个',
			},
			itemStyle: {
				normal: {
					color: new echarts.graphic.LinearGradient(
						0, 0, 0, 1, [{
								offset: 0,
								color: '#00c9ff'
							},
							{
								offset: 1,
								color: '#0072fe'
							}
						]
					)
				},
			},
			data: sp_ydata[0]
		}, ]
	};
	myChart.setOption(option);
	auto_change_data(5000);
	myChart.resize();

	function auto_change_data(time) {
		clearInterval(timer_bar_13);
		var idx = 0;
		timer_bar_13 = setInterval(function () {
			if (idx == sp_data_length - 1) {
				idx = 0;
			} else {
				idx++;
			}
			option.xAxis[0].data = sp_xdata[idx];
			option.series[0].data = sp_ydata[idx];
			myChart.setOption(option);
		}, time);
	}
	// 监听页面大小变化 同时对图表进行resize
	window.onresize = function () {
		myChart.resize();
	}
};

var timer_bar_14;
var chart_bar_14 = function (pxdata, pydata) {
	var myChart = echarts.init(document.getElementById('chart_bar_14'));
	var nameArr = pxdata || S_mock.xdata(1, 9, '妇女之家');
	var dataArr = pydata || S_mock.array(nameArr.length, 100, 200);
	var total = 0;
	for (var i = 0; i < dataArr.length; i++) {
		total += dataArr[i];
	}
	//分割数组
	var spArray = function (N, Q) {
		var R = [],
			F;
		var new_arr = [];
		for (F = 0; F < Q.length;) {
			R.push(Q.slice(F, F += N))
		}
		return R
	}
	var sp_xdata = spArray(3, dataArr);
	var sp_ydata = spArray(3, nameArr);
	var sp_data_length = sp_xdata.length;
	var option = {
		grid: {
			top: '8%',
			bottom: '8%',
			left: '4%',
			right: '5%',
			containLabel: true,
		},
		dataZoom: [{
			type: 'inside',
			yAxisIndex: [0],
			start: 0,
		}],
		tooltip: {
			trigger: 'axis',
			axisPointer: {
				type: 'shadow',
				lineStyle: {
					color: '#39627d'
				}
			},
			//formatter: '{b} {c}家'
		},
		yAxis: [{
			type: 'category',
			zlevel: 1,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#0072fe'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: '#0072fe'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				fontSize: getSize(0.3),
				color: '#eee',
			},
			axisTick: {
				show: false,
			},
			inverse: true,
			data: sp_ydata[0]
		}],
		xAxis: [{
			type: 'value',
			name: '支',
			nameTextStyle: {
				color: "#ccc",
				fontSize: getSize(0.3),
			},
			boundaryGap: true,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#0072fe'
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: '#0072fe'
				},
			},
			axisLabel: {
				show: true,
				fontSize: getSize(0.3),
				color: '#eee',
			},
			axisTick: {
				show: true,
				inside: true,
				lineStyle: {
					color: '#0072fe'
				},
			},
		}],
		series: [{
			name: '',
			type: 'bar',
			barGap: 0,
			barWidth: getSize(0.4),
			label: {
				show: true,
				position: 'insideRight',
				formatter: '{c}',
				//formatter: function(para) {
				//var pct = (dataArr[nameArr.indexOf(para.name)] / getArrSum(dataArr) * 100).toFixed(2);
				//return pct + '%  '
				//},
				color: '#fff',
				fontSize: getSize(0.3),
				padding: [2, 10, 0, 0]
			},
			itemStyle: {
				//barBorderRadius: getSize(0.05),
				color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
						offset: 0, //// 0% 处的颜色
						color: '#0072fe'
					},
					{
						offset: 1,
						color: '#00c9ff'
					}
				], false),
			},
			data: sp_xdata[0]
		}]
	};
	myChart.setOption(option);
	auto_change_data(5000);
	myChart.resize();

	function auto_change_data(time) {
		clearInterval(timer_bar_14);
		var idx = 0;
		timer_bar_14 = setInterval(function () {
			if (idx == sp_data_length - 1) {
				idx = 0;
			} else {
				idx++;
			}
			option.yAxis[0].data = sp_ydata[idx];
			option.series[0].data = sp_xdata[idx];
			myChart.setOption(option);
		}, time);
	}
	// 监听页面大小变化 同时对图表进行resize
	window.onresize = function () {
		myChart.resize();
	}
}

var chart_bar_15 = function (pxdata, pydata1, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_15'));
	var nameArr = pxdata || ["用工", "用地", "用能", "资金", "人才", "审批"];
	var dataArr = pydata1 || S_mock.array(nameArr.length, 1000, 1200);
	var max_val = Math.max.apply(null, dataArr)
	var dataArr2 = pydata2 || S_mock.array(nameArr.length, max_val, max_val);
	var total = 0;
	for (var i = 0; i < dataArr.length; i++) {
		total += dataArr[i];
	}
	var bar_cov = [],
		barBg_cov = []; // 外框背景
	for (key in dataArr) {
		if (key % 2) {
			bar_cov.push({
				value: dataArr[key],
				itemStyle: {
					barBorderRadius: getSize(0.18),
					color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
							offset: 0, //// 0% 处的颜色
							color: '#33DDF8'
						},
						{
							offset: 1,
							color: '#33DDF8'
						}
					], false),
				},
			});
			barBg_cov.push({
				value: dataArr2[key],
				itemStyle: {
					normal: {
						barBorderRadius: getSize(0.18),
						color: 'rgba(51, 221, 248, 0.3)', //rgba设置透明度0.14
					}
				},
			});
		} else {
			bar_cov.push({
				value: dataArr[key],
				itemStyle: {
					barBorderRadius: getSize(0.18),
					color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
							offset: 0, //// 0% 处的颜色
							color: '#2473EF'
						},
						{
							offset: 1,
							color: '#2473EF'
						}
					], false),
				},
			});
			barBg_cov.push({
				value: dataArr2[key],
				itemStyle: {
					normal: {
						barBorderRadius: getSize(0.18),
						color: 'rgba(36, 115, 239, 0.3)', //rgba设置透明度0.14
					}
				},
			});
		}
	}
	var option = {
		grid: {
			top: '6%',
			bottom: '6%',
			left: '4%',
			right: '2%',
			containLabel: true,
		},
		tooltip: {
			show: false,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow',
				lineStyle: {
					color: '#39627d'
				}
			},
			// formatter: '{b} {c}家'
			// formatter: '{b0}: <br /> {a0}:{c0}人<br />{a1}:{c1}人'
		},
		yAxis: [{
			type: 'category',
			zlevel: 1,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: 'rgba(255, 255, 255, 0.26)'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: true,
				lineStyle: {
					color: 'rgba(255, 255, 255, 0.26)'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				fontSize: getSize(0.28),
				fontWeight: 'bold',
				color: 'rgba(255, 255, 255, 0.7)',
			},
			axisTick: {
				show: false,
			},
			inverse: true,
			data: nameArr
		}, {
			type: 'category',
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: 'rgba(255, 255, 255, 0.26)'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: false,
				lineStyle: {
					color: 'rgba(255, 255, 255, 0.26)'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				fontSize: getSize(0.28),
				formatter: function (para) {
					var value = dataArr[nameArr.indexOf(para)];
					var pct = (value / total * 100).toFixed(0);
					var valueData = '{a|' + value + '}{b|（' + pct + '%）}';
					return valueData;
				},
				rich: {
					a: {
						color: '#28F2E6',
						fontSize: getSize(0.28),
						fontFamily: 'FZZYJW'
					},
					b: {
						color: '#FEFEFF',
						fontSize: getSize(0.28),
						fontFamily: 'FZZYJW'
					}
				}
			},
			axisTick: {
				show: false,
			},
			inverse: true,
			data: nameArr
		}],
		xAxis: [{
			type: 'value',
			boundaryGap: true,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#6b85a3'
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: '#fff'
				},
			},
			axisLabel: {
				show: false,
				color: '#fff',
			},
			axisTick: {
				show: false,
			},
		}],
		series: [{
			name: '',
			type: 'bar',
			barGap: 0,
			stack: 'a',
			barWidth: getSize(0.18),

			data: bar_cov
		}, {
			name: '外框',
			type: 'bar',
			barWidth: getSize(0.18),
			barGap: '-100%',
			z: 0,
			data: barBg_cov
		}]
	};
	myChart.setOption(option);
}

var chart_bar_16 = function (pxdata, pydata1) {
	var myChart = echarts.init(document.getElementById('chart_bar_16'));
	var nameArr = pxdata || ["XX街道1", "XX街道2", "XX街道3", "XX街道4", "XX街道5"];
	var dataArr = pydata1 || [10, 50, 60, 30, 20];
	var total = 0;
	for (var i = 0; i < dataArr.length; i++) {
		total += dataArr[i];
	}
	var bar_cov = [];
	var colorList = ['#f36c6c', '#e6cf4e', '#20d180', '#0093ff']; // 序号颜色
	var maxArr = (new Array(nameArr.length)).fill(100);
	for (key in dataArr) {
		bar_cov.push({
			value: dataArr[key],
		});
	}
	var option = {
		grid: {
			top: '15%',
			bottom: '4%',
			left: '6%',
			right: '15%',
			containLabel: true,
		},
		tooltip: {
			show: false,
			trigger: 'axis',
			axisPointer: {
				type: 'shadow',
				lineStyle: {
					color: '#39627d'
				}
			},
			// formatter: '{b} {c}家'
		},
		title: {
			text: '最近一天经过车辆最多道路TOPS',
			x: 'center',
			top: '4%',
			textStyle: {
				color: '#fff',
				fontWeight: 600,
				fontSize: getSize(0.28),
			}
		},
		yAxis: [{
			type: 'category',
			inverse: true,
			zlevel: 1,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#eee'
				}
			},
			axisLine: { //坐标轴轴线相关设置。数学上的x轴
				show: false,
				lineStyle: {
					color: 'rgba(255, 255, 255, 0.26)'
				},
			},
			axisLabel: { //坐标轴刻度标签的相关设置
				fontSize: 14,
				color: '#fff',
				rich: {
					a1: {
						color: '#fff',
						backgroundColor: colorList[0],
						//backgroundColor: {
						//repeat: "repeat",
						//image: "./public/img/first-street.png" // 
						//},
						width: 19,
						height: 19,
						align: 'center',
						borderRadius: 19
					},
					a2: {
						color: '#fff',
						backgroundColor: colorList[1],
						width: 19,
						height: 19,
						align: 'center',
						borderRadius: 19
					},
					a3: {
						color: '#fff',
						backgroundColor: colorList[2],
						width: 19,
						height: 19,
						align: 'center',
						borderRadius: 19
					},
					b: {
						color: '#fff',
						backgroundColor: colorList[3],
						width: 19,
						height: 19,
						align: 'center',
						borderRadius: 19
					}
				},
				formatter: function (params) {
					function contains(arr, obj) {
						var i = arr.length;
						while (i--) {
							if (arr[i] === obj) {
								return i;
							}
						}
						return false;
					}
					var index = contains(nameArr, params);
					index = index + 1;
					if (index - 1 < 3) {
						return [
							'{a' + index + '|' + index + '}' + '  ' + params
						].join('\n')
					} else {
						return [
							'{b|' + index + '}' + '  ' + params
						].join('\n')
					}
				}
			},
			axisTick: {
				show: false,
			},
			inverse: true,
			data: nameArr
		}],
		xAxis: [{
			type: 'value',
			boundaryGap: true,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#eee'
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: '#eee'
				},
			},
			axisLabel: {
				show: false,
				fontSize: 14,
				color: '#fff',
			},
			axisTick: {
				show: false,
			},
		}],
		series: [{
			name: '',
			type: 'bar',
			barGap: 0,
			label: {
				show: true,
				position: 'right',
				color: '#fff',
				formatter: '{c}',
			},
			itemStyle: {
				barBorderRadius: 5,
				color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
						offset: 0, //// 0% 处的颜色
						color: '#0070FF'
					},
					{
						offset: 1,
						color: '#81B8FF'
					}
				], false),
			},
			barWidth: 5,
			data: bar_cov
		}]
	};
	myChart.setOption(option);
	$(window).resize(function () {
		myChart.resize();
	});
}

var chart_bar_17 = function (pxdata, pydata1, pydata2, pydata3, pydata4, pydata5, pydata6) {
	var myChart = echarts.init(document.getElementById('chart_bar_17'));
	var xdata = pxdata || ['2021-01', '2021-02', '2021-03', '2021-04', '2021-05'];
	var ydata = pydata1 || S_mock.array(xdata.length, 100, 200);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 100, 200);
	var ydata3 = pydata3 || S_mock.array(xdata.length, 100, 200);
	var ydata4 = pydata4 || S_mock.array(xdata.length, 100, 200);
	var ydata5 = pydata5 || S_mock.array(xdata.length, 100, 200);
	var ydata6 = pydata6 || S_mock.array(xdata.length, 100, 200);
	var legend_arr = [];
	legend_arr = [{
		name: '已启动',
		icon: 'image://assets/img/bar-17-1.png',
	}, {
		name: '试运行',
		icon: 'image://assets/img/bar-17-2.png',
	}, {
		name: '已完成',
		icon: 'image://assets/img/bar-17-3.png',
	}];
	var color_arr = ['#00F0FF', '#FFBE00', '#00FEB4']
	var symbol_img1 = 'image://./assets/img/bar-17-1.png';
	var symbol_img2 = 'image://./assets/img/bar-17-2.png';
	var symbol_img3 = 'image://./assets/img/bar-17-3.png';
	var option = {
		// backgroundColor: '#000922',
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			},
			textStyle: {
				fontFamily: "Microsoft YaHei"
			},
			formatter: function (params) {
				var str = '<div style="text-align: center;padding-bottom: 0.1rem;font-size: 0.36rem">' + params[0].name + '</div>'
				var index = xdata.indexOf(params[0].name);
				str += '<div style="text-align: left">' +
					'<div style="margin-bottom: 0.1rem;"><i class="marker" style="background: #229ef2;"></i>' + params[0].seriesName + '： ' + params[0].value + ' 套   <span style="padding-left: 0.2rem">  ' + ydata4[index] + '%</span></div>' +
					'<div  style="margin-bottom: 0.1rem;"><i class="marker" style="background: #BA8E26"></i>' + params[1].seriesName + '： ' + params[1].value + ' 套  <span style="padding-left: 0.2rem">   ' + ydata5[index] + '%</span></div>' +
					'<div  style="margin-bottom: 0.1rem;"><i class="marker" style="background: #2DE799"></i>' + params[2].seriesName + '： ' + params[2].value + ' 套   <span style="padding-left: 0.2rem">  ' + ydata6[index] + '%</span></div>' +
					'</div>';
				return str;
			}
		},
		color: ['#00F0FF', '#BA8E26', '#2DE799'],
		grid: {
			left: '4%',
			top: "22%",
			right: '4%',
			bottom: '5%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			show: true,
			top: '5%',
			icon: 'roundRect',
			itemGap: getSize(2),
			textStyle: {
				color: "#fff",
				fontSize: getSize(0.25),
				padding: [0, getSize(0.2), 0, getSize(0.2)]
			},
			data: legend_arr
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#ccc",
				fontSize: getSize(0.3),
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#fff",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '(个)',
			nameTextStyle: {
				color: "#fff",
				fontSize: getSize(0.28),
			},
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: getSize(0.28),
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#fff',
					opacity: 0.1,
					width: 1,
					type: 'dash',
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: '#fff',
					width: 1 //这里是为了突出显示加上的
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: legend_arr[0].name,
			type: 'pictorialBar',
			barCategoryGap: '0%',
			barWidth: 20,
			barGap: '10%',
			// symbol: 'triangle',
			symbol: symbol_img1,
			symbolSize: [20, 8],
			symbolRepeat: true,
			symbolMargin: 3,
			label: {
				show: false,
				position: 'top',
				distance: 15,
				color: '#DB5E6A',
				fontWeight: 'bolder',
				fontSize: 20,
			},
			data: ydata,
			z: 10
		}, {
			name: legend_arr[1].name,
			type: 'pictorialBar',
			barCategoryGap: '0%',
			barWidth: 20,
			barGap: '10%',
			// symbol: 'triangle',
			symbol: symbol_img2,
			symbolSize: [20, 8],
			symbolRepeat: true,
			symbolMargin: 3,
			label: {
				show: false,
				position: 'top',
				distance: 15,
				color: '#DB5E6A',
				fontWeight: 'bolder',
				fontSize: 20,
			},
			data: ydata2,
			z: 10
		}, {
			name: legend_arr[2].name,
			type: 'pictorialBar',
			barCategoryGap: '0%',
			barWidth: 20,
			barGap: '10%',
			// symbol: 'triangle',
			symbol: symbol_img3,
			symbolSize: [20, 8],
			symbolRepeat: true,
			symbolMargin: 3,
			label: {
				show: false,
				position: 'top',
				distance: 15,
				color: '#DB5E6A',
				fontWeight: 'bolder',
				fontSize: 20,
			},
			data: ydata3,
			z: 10
		}]
	};
	myChart.setOption(option);
}

var chart_bar_18 = function (pxdata, pydata, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_18'));
	var xdata = pxdata || S_mock.xdata(1, 1, '类别');
	var ydata = pydata || S_mock.array(xdata.length, 70, 90);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 70, 90);
	var dataArr2 = S_mock.array(xdata.length, 100, 100);
	var legend_arr = ['企业家教', '工业总产值'];
	var bar_bg_blue = 'image://./assets/img/bar-18-1.png';
	var bar_bg_yellow = 'image://./assets/img/bar-18-2.png';
	var bar_bg = 'image://./assets/img/zhu-bg.png';
	var option = {
		tooltip: {
			show: true,
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			},
			formatter: '{b}<br />{a0}：{c0}<br />{a1}：{c1}'
		},
		color: ['#5696F8', '#FFC04D'],
		grid: {
			left: '4%',
			top: "20%",
			right: '4%',
			bottom: '4%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			top: '2%',
			icon: 'roundRect',
			itemWidth: 54,
			itemHeight: 14,
			itemGap: 50,
			textStyle: {
				color: "#fff",
				fontSize: 14
			},
			data: legend_arr
		},
		xAxis: [{
			type: 'category',
			axisLabel: {
				inside: false,
				textStyle: {
					color: '#fff',
					fontWeight: 'normal',
					fontSize: 14,
				}
			},
			axisLine: {
				show: true,
				lineStyle: {
					color: "#eee",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
			data: xdata
		}, {
			type: 'category',
			axisLine: {
				show: false
			},
			axisTick: {
				show: false
			},
			axisLabel: {
				show: false
			},
			splitArea: {
				show: false
			},
			splitLine: {
				show: false
			},
			data: xdata
		}],
		yAxis: [{
			show: true,
			type: 'value',
			name: '企业家教（家）',
			nameTextStyle: {
				color: "#fff",
				fontSize: 14,
				padding: [0, 0, -4, 0]
			},
			axisLabel: {
				show: true,
				interval: 2,
				color: "#fff",
				fontSize: 14,
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#eee',
					opacity: 1,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: "#eee",
				}
			},
			axisTick: {
				show: false
			},
		}, {
			type: 'value',
			name: '工业总产值',
			nameTextStyle: {
				color: "#fff",
				fontSize: 14,
				padding: [0, 0, -4, 0]
			},
			axisLabel: {
				show: true,
				interval: 2,
				color: "#fff",
				fontSize: 14,
			},
			splitNumber: 5,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#eee',
					opacity: 1,
					width: 1,
					type: 'dashed',
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: "#eee",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
				name: legend_arr[0],
				type: 'pictorialBar',
				barWidth: 60,
				barGap: '50%',
				symbol: bar_bg_blue,
				symbolSize: ['100%', '100%'],
				symbolRepeat: false,
				label: {
					show: false,
					rotate: 90,
					position: 'inside',
					formatter: '{c}%',
					fontSize: 16,
					color: '#00FFE9'
				},
				zlevel: 2,
				data: ydata
			}, {
				name: legend_arr[1],
				type: 'pictorialBar',
				barWidth: 60,
				barGap: '45%',
				yAxisIndex: 1,
				symbol: bar_bg_yellow,
				symbolSize: ['100%', '100%'],
				symbolRepeat: false,
				label: {
					show: false,
				},
				zlevel: 2,
				data: ydata2
			},
			{
				type: 'pictorialBar',
				barWidth: 60,
				barGap: '50%',
				xAxisIndex: 1,
				symbol: bar_bg,
				symbolSize: ['100%', '100%'],
				symbolRepeat: false,
				zlevel: 1,
				data: dataArr2
			},
			{
				type: 'pictorialBar',
				barWidth: 60,
				barGap: '45%',
				xAxisIndex: 1,
				symbol: bar_bg,
				symbolSize: ['100%', '100%'],
				symbolRepeat: false,
				zlevel: 1,
				data: dataArr2
			}
		]
	};
	myChart.setOption(option);
}

var chart_bar_19 = function (pxdata, pydata1, ptitle) {
	var myChart = echarts.init(document.getElementById('chart_bar_19'));
	var xdata = pxdata || ["监督处", "老龄处", "妇幼处", "人口处", "宣传处", "健康处", "合作处", "保健局", "组织人事处", "相关党委", "中医局"];
	var ydata = pydata1 || S_mock.array(xdata.length, 10, 100);
	var legend_arr = ['工作进度'];
	var chartTitle = ptitle || "图表标题";
	var dataZoomEnd = (6 / xdata.length) * 100;
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		title: {
			show: true,
			text: chartTitle,
			x: 'center',
			top: '2%',
			textStyle: {
				color: '#fff',
				fontSize: 20,
				fontWeight: 'bold',
				fontFamily: 'Microsoft YaHei'
			}
		},
		// 滚动条
		dataZoom: [ //给x轴设置滚动条
			{
				start: 0, //默认为0
				end: dataZoomEnd,
				orient: 'vertical',
				type: 'slider',
				maxValueSpan: 14, //窗口的大小，显示数据的条数的
				show: true,
				yAxisIndex: [0],
				handleSize: 0, //滑动条的 左右2个滑动条的大小
				height: '100%', //组件高度
				top: '10%', //上边的距离
				right: '2%', //右边的距离
				bottom: '2%', //底边的距离
				width: 0,
				// borderColor: "rgba(43,48,67,0.8)",
				fillerColor: '#33384b',
				// backgroundColor: 'rgba(43,48,67,0.8)', //两边未选中的滑动条区域的颜色
				showDataShadow: false, //是否显示数据阴影 默认auto
				showDetail: false, //即拖拽时候是否显示详细数值信息 默认true
				realtime: true, //是否实时更新
				filterMode: 'filter',
				yAxisIndex: [0], //控制的 y轴
				zoomOnMouseWheel: 'shift',
				moveOnMouseMove: 'shift',
				moveOnMouseWheel: true,
				moveOnMouseMove: true,
			},
			//下面这个属性是里面拖到
			{
				type: 'inside',
				orient: 'vertical',
				show: true,
				yAxisIndex: [0],
				start: 0, //默认为1
				end: dataZoomEnd,
				zoomOnMouseWheel: 'shift',
				moveOnMouseMove: 'shift',
				moveOnMouseWheel: true,
				moveOnMouseMove: true,
			},
		],
		grid: {
			left: '1%',
			top: "12%",
			right: '6%',
			bottom: '2%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			show: true,
			top: '3%',
			right: "5%",
			itemWidth: 12, // 设置宽度
			itemHeight: 12, // 设置高度
			icon: 'rect',
			itemGap: 35,
			textStyle: {
				color: '#fff',
				fontSize: 14,
				fontWeight: 'bold',
				fontFamily: 'Microsoft YaHei'
			},
			data: legend_arr
		},
		xAxis: [{
			position: 'top',
			type: 'value',
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			axisLabel: {
				interval: 0,
				color: '#fff',
				fontSize: 14,
				fontWeight: 'bold',
				fontFamily: 'Microsoft YaHei',
				formatter: '{value}%'
			},
			min: 0,
			max: 100,
			splitNumber: 10,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: true,
				lineStyle: {
					color: '#f0f0f0',
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: "#f0f0f0",
				}
			},
			axisTick: {
				show: false
			},
		}],
		yAxis: [{
			type: 'category',
			nameLocation: "start",
			name: '',
			inverse: true, // 取反
			data: xdata,
			nameTextStyle: {
				color: '#fff',
				fontSize: 14,
				fontWeight: 'bold',
				fontFamily: 'Microsoft YaHei',
			},
			axisLabel: {
				interval: 0,
				color: '#fff',
				fontSize: 14,
				fontWeight: 'bold',
				fontFamily: 'Microsoft YaHei',
				lineHeight: 20,
				formatter: function (value) {
					let valueText = '';
					if (value.length > 40) {
						valueText = value.substring(0, 39) + '...';
					} else {
						valueText = value;
					}
					return valueText;
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: "#C1C1C1",
				}
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: legend_arr[0],
			type: 'bar',
			barGap: '0.1',
			barWidth: "21",
			label: {
				show: true,
				position: 'right',
				color: '#fff',
				fontSize: 14,
				fontWeight: 'bold',
				fontFamily: 'Microsoft YaHei',
				formatter: function (params) {
					return params.value + '%';
				},
			},
			itemStyle: {
				normal: {
					barBorderRadius: [0, 8, 8, 0],
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: '#619DEA'
					}, {
						offset: 1,
						color: '#4D8AD8'
					}]),
				}
			},
			data: ydata
		}]
	};
	myChart.setOption(option);
	$(window).resize(function () {
		myChart.resize();
	});
}

var chart_bar_20 = function (pxdata, pydata1, pydata2) {
	var myChart = echarts.init(document.getElementById('chart_bar_20'));
	var xdata = pxdata || ['群众上访总量下降'];
	var ydata = pydata1 || S_mock.array(xdata.length, 20, 30);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 10, 20);
	var color_arr = ['#85B4F7', '#FCCE69'];
	var legend_arr = ['图例1', '图例2'];
	var ydata_cov = [],
		ydata_cov2 = [];
	for (var key in ydata) {
		ydata_cov.push({
			value: ydata[key],
			itemStyle: { //折线拐点标志的样式。                
				normal: {
					color: color_arr[key]
				}
			},
		});
		ydata_cov2.push({
			value: ydata2[key],
			itemStyle: { //折线拐点标志的样式。                
				normal: {
					color: color_arr[key]
				}
			},
		});
	}
	var option = {
		tooltip: {
			trigger: 'axis',
			axisPointer: { // 坐标轴指示器，坐标轴触发有效
				type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
			}
		},
		color: color_arr,
		grid: {
			left: '4%',
			top: "14%",
			right: '4%',
			bottom: '4%',
			containLabel: true, //grid 区域是否包含坐标轴的刻度标签。
		},
		legend: {
			show: false,
			top: '12%',
			icon: 'roundRect',
			textStyle: {
				color: "#fff",
				fontSize: 12
			},
			data: legend_arr
		},
		xAxis: [{
			nameLocation: "start",
			nameTextStyle: {
				color: "#fff",
			},
			nameGap: '1',
			type: 'category',
			data: xdata,
			axisLabel: {
				interval: 0,
				color: "#fff",
				fontSize: 16,
				fontFamily: 'PingFang SC'
			},
			axisLine: {
				show: true,
				lineStyle: {
					width: 6,
					color: "#569DF3",
				}
			},
			axisTick: {
				show: false
			},
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
			},
		}],
		yAxis: [{
			// show:false,
			type: 'value',
			name: '',
			nameTextStyle: {
				show: false,
				color: "#fff",
				fontSize: 13,
				padding: [0, 0, 0, 10]
			},
			axisLabel: {
				show: false,
				interval: 0,
				color: "#fff",
				fontSize: 14,
			},
			splitNumber: 4,
			splitLine: { //坐标轴在 grid 区域中的分隔线
				show: false,
				lineStyle: {
					color: '#056C76',
					opacity: 1,
					width: 1,
					type: 'solid',
				}
			},
			axisLine: {
				show: false,
				lineStyle: {
					color: "#02BDCC",
				}
			},
			axisTick: {
				show: false
			},
		}],
		series: [{
			name: legend_arr[0],
			type: 'bar',
			barGap: '50%',
			barWidth: "45",
			label: {
				show: true,
				position: 'top',
				fontSize: 16,
				color: '#fff',
				fontFamily: 'Microsoft YaHei',
				fontWeight: 700,
				formatter: '{c}%',
			},
			data: ydata_cov
		}, {
			name: legend_arr[1],
			type: 'bar',
			barGap: '50%',
			barWidth: "45",
			// label: {
			//     show: true,
			//     position: 'top',
			// },
			label: {
				show: true,
				position: "top",
				textStyle: {
					fontSize: 16,
					color: "#fff",
					rich: {
						a: {
							fontSize: 16,
							color: '#fff',
							fontFamily: 'Microsoft YaHei',
							fontWeight: 700,
						},
						b: {
							width: 10,
							height: 12,
							backgroundColor: {
								image: "../echarts_collection/assets/img/bar-17-2.png",
							},
						},
						c: {
							fontSize: 16,
							color: '#fff',
							fontFamily: 'Microsoft YaHei',
							fontWeight: 700,
							padding: [5, 0, 0, 0]
						}
					},
				},
				distance: 5,
				formatter: (params) => {
					return (
						"{b|}{a|" +
						(ydata[params.dataIndex] - params.value) +
						"%}\n{c|" +
						params.value +
						"%}"
					);
				},
			},
			data: ydata_cov2
		}]
	};
	myChart.resize();
	myChart.setOption(option);
}

var chart_bar_21 = function (pxdata, pydata1, pydata2) {
	let mychart = echarts.init(document.getElementById("chart_bar_21"));
	let name = pxdata || S_mock.xdata(1, 6, "月");
	let value1 = pydata1 || S_mock.array(name.length, 0, 100);
	let value2 = pydata2 || S_mock.array(name.length, 0, 100);
	let legend = ["企业诉求量", "办结量"];
	let colors = ["#6FB6FC", "#FDC43E"];
	let option = {
		tooltip: {
			trigger: "axis",
			confine: true,
		},
		grid: {
			top: "15%",
			left: "4%",
			right: "4%",
			bottom: "15%",
			containLabel: true,
		},
		color: colors,
		legend: {
			data: legend,
			itemWidth: 10,
			itemHeight: 10,
			itemGap: 10,
			textStyle: {
				fontSize: 13,
				color: "#5E7089",
				fontFamily: 'PingFang SC'
			},
			borderColor: "#fff",
			x: "center",
			bottom: "0%",
		},
		xAxis: {
			type: "category",
			axisTick: {
				show: false,
			},
			splitLine: {
				show: false,
			},
			axisLine: {
				lineStyle: {
					color: "#fff",
					width: 1,
				},
			},
			axisLabel: {
				textStyle: {
					fontSize: 12,
					fontFamily: 'PingFang SC',
					color: "#fff",
				},
			},
			data: name,
		},
		yAxis: {
			type: "value",
			axisTick: {
				show: false,
			},
			splitLine: {
				show: true,
				lineStyle: {
					color: "#fff",
					opacity: 0.2,
					width: 1,
				},
			},
			splitNumber: 5,
			axisLine: {
				show: true,
				lineStyle: {
					color: "#fff",
					width: 1,
				},
			},
			axisLabel: {
				textStyle: {
					fontSize: 12,
					fontFamily: 'PingFang SC',
					color: "#fff",
				},
			},
		},
		series: [{
				type: "line",
				stack: 0,
				name: legend[0],
				data: value1,
				showAllSymbol: true,
				itemStyle: {
					borderColor: colors[0],
				},
				lineStyle: {
					width: 2,
					color: colors[0],
				},
				tooltip: {
					show: false,
				},
			},
			{
				type: "bar",
				name: legend[0],
				barWidth: 24,
				data: value1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(
						0,
						0,
						0,
						1,
						[{
								offset: 0,
								color: colors[0],
							},
							{
								offset: 1,
								color: "rgba(111, 182, 252, 1)",
							},
						],
						false
					),
				},
			},
			{
				type: "line",
				stack: 0,
				name: legend[1],
				data: value2,
				showAllSymbol: true,
				itemStyle: {
					borderColor: colors[1],
				},
				lineStyle: {
					width: 2,
					color: colors[1],
				},
				tooltip: {
					show: false,
				},
			},
			{
				type: "bar",
				name: legend[0],
				barWidth: 24,
				data: value2,
				barGap: "-100%",
				itemStyle: {
					color: new echarts.graphic.LinearGradient(
						0,
						0,
						0,
						1,
						[{
								offset: 0,
								color: colors[1],
							},
							{
								offset: 1,
								color: "rgba(255, 255, 255, 1)",
							},
						],
						false
					),
				},
			},
		],
	};
	mychart.resize();
	mychart.setOption(option);
};

var chart_bar_22 = function (pxdata, pydata1, pydata2) {
	let mychart = echarts.init(document.getElementById("chart_bar_22"));
	let name = pxdata || ['发改局', '邮政局', '区政府'];
	let value1 = pydata1 || S_mock.array(name.length, 0, 20);
	let value2 = pydata2 || S_mock.array(name.length, -10, 10);
	let legend = ["本周耗时", "较上周耗时"];
	let colors = ["#00f3d5", "#00ccff"];
	let option = {
		tooltip: {
			trigger: "axis",
			confine: true,
			formatter: '{b}<br />{a0}：{c0}h<br />{a1}：{c1}h'
		},
		grid: {
			top: "15%",
			left: "4%",
			right: "4%",
			bottom: "10%",
			containLabel: true,
		},
		color: colors,
		legend: {
			show: false,
			data: legend,
			itemWidth: 10,
			itemHeight: 10,
			itemGap: 10,
			textStyle: {
				fontSize: 13,
				color: "#5E7089",
				fontFamily: 'PingFang SC'
			},
			borderColor: "#fff",
			x: "center",
			bottom: "0%",
		},
		xAxis: {
			type: "category",
			axisTick: {
				show: false,
			},
			splitLine: {
				show: false,
			},
			axisLine: {
				lineStyle: {
					color: "#51A7F7",
					opacity: 0.3,
					type: 'dashed'
				},
			},
			axisLabel: {
				textStyle: {
					fontSize: getSize(0.32),
					fontFamily: 'PingFang SC',
					color: "rgba(255,255,255,0.7)",
				},
			},
			data: name,
		},
		yAxis: {
			type: "value",
			axisTick: {
				show: false,
			},
			splitLine: {
				show: true,
				lineStyle: {
					color: "#51A7F7",
					opacity: 0.3,
					type: 'dashed'
				},
			},
			splitNumber: 5,
			axisLine: {
				show: false,
				lineStyle: {
					color: "#51A7F7",
					opacity: 0.3,
					type: 'dashed'
				},
			},
			axisLabel: {
				show: false,
				textStyle: {
					fontSize: 12,
					fontFamily: 'PingFang SC',
					color: "#fff",
				},
			},
		},
		series: [{
				type: "bar",
				name: legend[0],
				barWidth: getSize(0.48),
				stack: 'a',
				data: value1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(
						0,
						0,
						0,
						1,
						[{
								offset: 0,
								color: "rgba(0, 243, 213, 1)",
							},
							{
								offset: 1,
								color: "rgba(0, 243, 213, 0.1)",
							},
						],
						false
					),
				},
			},
			{
				type: "bar",
				name: legend[1],
				barWidth: getSize(0.48),
				data: value2,
				stack: 'a',
				itemStyle: {
					normal: {
						color: function (params) { //展示负值的柱子，正数设为透明
							let colorArr = params.value > 0 ? ['rgba(25, 176, 254, 1)', 'rgba(25, 176, 254, 0.1)'] : ['rgba(255, 175, 3, 0.1)', 'rgba(255, 175, 3, 1)']
							return new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
								offset: 0,
								color: colorArr[0] // 0% 处的颜色
							}, {
								offset: 1,
								color: colorArr[1] // 100% 处的颜色
							}], false)
						},
					},
				},
			}
		],
	};
	mychart.resize();
	mychart.setOption(option);
}

var chart_pie_1 = function (pxdata, pydata, punit) {
	var mychart = echarts.init(document.getElementById('chart_pie_1'));
	var color_arr = ['#3196fa', '#00ffc6', '#00cd60', '#ffa800'];
	var xdata = pxdata || ['项目1', '项目2', '项目3', '项目4'];
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var seri_data = [];
	var dw = punit || '项';
	for (var key in xdata) {
		if (key == 0) {
			seri_data.push({
				name: xdata[key],
				value: ydata[key],
				label: {
					show: true
				}
			})
		} else {
			seri_data.push({
				name: xdata[key],
				value: ydata[key]
			})
		}
	}
	var option = {
		color: color_arr,
		title: {
			show: false,
			left: 'center',
			top: 'top',
			text: '标题',
			textStyle: {
				fontWeight: 'normal',
				color: '#facc14',
			},
		},
		tooltip: {
			trigger: 'item',
			formatter: "{b}: {c} ({d}%)"
		},
		legend: {
			y: 'center',
			right: '4%',
			// itemWidth: getSize(0.24),
			// itemHeight: getSize(0.14),
			// itemGap: getSize(0.2),
			icon: 'roundRect',
			formatter: function (para) {
				var str = '{a|' + para + '} {b|';
				str += ydata[xdata.indexOf(para)] + '}  {c|' + dw + '}';
				if (para = '其他') {
					str = str.replace(/其他/, '其他');
				}
				return str;
			},
			textStyle: {
				padding: [getSize(0.1), getSize(0.2), 0, 0],
				rich: {
					a: {
						fontSize: getSize(0.3),
						color: '#fff'
					},
					b: {
						fontSize: getSize(0.3),
						color: '#facc14'
					},
					c: {
						fontSize: getSize(0.24),
						color: '#fff'
					}
				}
			},
			orient: 'vertical', //horizontal 水平 vertical 垂直
			data: xdata
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: false,
			center: ['30%', '50%'],
			radius: ['60%', '75%'],
			startAngle: 90,
			label: {
				show: false,
				fontSize: 16,
				fontFamily: 'DIN',
				position: 'center',
				formatter: '{a|' + getArrSum(ydata) + '}\n{b|总计}',
				rich: {
					a: {
						fontSize: getSize(0.44),
						color: '#FFA800'
					},
					b: {
						fontSize: getSize(0.24),
						color: '#fff'
					}
				}
			},
			// labelLine: {
			// 	show: true
			// },
			data: seri_data
		}]
	}
	mychart.setOption(option);
};

var chart_pie_2 = function (pxdata, pydata, punit) {
	var mychart = echarts.init(document.getElementById('chart_pie_2'));
	var color_arr = ['#3196fa', '#00ffc6', '#00cd60', '#ffa800'];
	var xdata = pxdata || ['项目1', '项目2', '项目3'];
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var seri_data = [];
	var dw = punit || '项';
	for (var key in xdata) {
		if (key == 0) {
			seri_data.push({
				name: xdata[key],
				value: ydata[key],
				label: {
					show: true
				}
			})
		} else {
			seri_data.push({
				name: xdata[key],
				value: ydata[key]
			})
		}
	}
	var option = {
		color: color_arr,
		title: {
			show: false,
			left: 'center',
			top: 'top',
			text: '标题',
			textStyle: {
				fontWeight: 'normal',
				color: '#facc14',
			},
		},
		tooltip: {
			trigger: 'item',
			formatter: "{b}: {c} ({d}%)"
		},
		legend: {
			y: 'bottom',
			right: 'center',
			// itemWidth: getSize(0.24),
			// itemHeight: getSize(0.14),
			// itemGap: getSize(0.2),
			icon: 'roundRect',
			formatter: function (para) {
				var str = '{a|' + para + '} {b|';
				str += ydata[xdata.indexOf(para)] + '}  {c|' + dw + '}';
				if (para = '其他') {
					str = str.replace(/其他/, '其他');
				}
				return str;
			},
			textStyle: {
				padding: [getSize(0.1), getSize(0.2), 0, 0],
				rich: {
					a: {
						fontSize: getSize(0.3),
						color: '#fff'
					},
					b: {
						fontSize: getSize(0.3),
						color: '#facc14'
					},
					c: {
						fontSize: getSize(0.24),
						color: '#fff'
					}
				}
			},
			orient: 'vertical', //horizontal 水平 vertical 垂直
			data: xdata
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: false,
			center: ['50%', '33%'],
			radius: ['50%', '60%'],
			startAngle: 90,
			label: {
				show: false,
				fontSize: 16,
				fontFamily: 'DIN',
				position: 'center',
				formatter: '{a|' + getArrSum(ydata) + '}\n{b|总计}',
				rich: {
					a: {
						fontSize: getSize(0.44),
						color: '#FFA800'
					},
					b: {
						fontSize: getSize(0.24),
						color: '#fff'
					}
				}
			},
			// labelLine: {
			// 	show: true
			// },
			data: seri_data
		}]
	}
	mychart.setOption(option);
};

var chart_pie_3 = function (pxdata, pydata, punit) {
	var colorArr = ['#FFA800', '#3196FA'];
	var xdata = pxdata || ['项目1', '项目2'];
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var dw = punit || '元';
	var dataArr = [];
	var legendArr = [];
	for (var i = 0; i < xdata.length; i++) {
		dataArr.push({
			name: xdata[i],
			value: ydata[i]
		});
		legendArr.push({
			icon: 'rect',
			name: xdata[i],
		});
	}
	var mychart = echarts.init(document.getElementById('chart_pie_3'));
	var option = {
		color: colorArr,
		tooltip: {
			trigger: 'item',
			formatter: "{a} <br/>{b}: {c} ({d})" + dw
		},
		legend: {
			y: 'center',
			right: '15%',
			itemWidth: getSize(0.4),
			itemHeight: getSize(0.24),
			itemGap: getSize(0.1),
			textStyle: {
				padding: [getSize(0.1), 0, 0, 0],
				rich: {
					a: {
						fontSize: getSize(0.28),
						color: '#fff'
					},
					b: {
						fontSize: getSize(0.24),
						color: '#facc14'
					},
					c: {
						fontSize: getSize(0.24),
						color: '#facc14'
					}
				}
			},
			formatter: function (para) {
				var str = '{a|' + para + '} {b|';
				str += ydata[xdata.indexOf(para)] + '}  {c|' + dw + '}';
				if (para = '其他') {
					str = str.replace(/其他/, '其他       ');
				}
				return str;
			},
			orient: 'vertical',
			data: legendArr
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: false,
			center: ['30%', '55%'],
			radius: ['0%', '60%'],
			startAngle: 90,
			itemStyle: {
				normal: {
					label: {
						show: true,
						fontSize: 16,
						fontFamily: 'DIN',
						// formatter: '{c}',
						formatter: '{d}%',
					},
					labelLine: {
						show: true
					}
				}
			},
			data: dataArr
		}]
	}
	mychart.setOption(option);
}

var chart_pie_4 = function (pxdata, pydata, punit) {
	var colorArr = ['#0089fd', '#0af9be', '#f9bc31', '#cb3458'];
	var xdata = pxdata || ['劳动人事类', '交通运输类', '交通运输类2', '交通类']
	var ydata = pydata || [1200, 1200, 1200, 1200];
	var dataArr = [];
	var legendArr = [];
	var dw = punit || '个';
	for (var i = 0; i < xdata.length; i++) {
		if (i === 0) {
			dataArr.push({
				name: xdata[i],
				value: ydata[i],
				label: {
					show: true
				}
			});
			legendArr.push({
				icon: 'roundRect',
				name: xdata[i],
			});
		} else {
			dataArr.push({
				name: xdata[i],
				value: ydata[i]
			});
			legendArr.push({
				icon: 'roundRect',
				name: xdata[i],
			});
		}

	}
	var mychart = echarts.init(document.getElementById('chart_pie_4'));
	var option = {
		color: colorArr,
		tooltip: {
			trigger: 'item',
			formatter: "{b}: {c}个 ({d}%)"
		},
		legend: {
			y: 'center',
			right: '0%',
			itemWidth: getSize(0.24),
			itemHeight: getSize(0.14),
			itemGap: getSize(0.25),
			formatter: function (para) {
				var pct = (ydata[xdata.indexOf(para)] / getArrSum(ydata) * 100).toFixed(2);
				var str = '{a|' + para + '}';
				if (xdata.indexOf(para) === 0) {
					str += '{b|' + pct + '%}';
				} else if (xdata.indexOf(para) === 1) {
					str += '{c|' + pct + '%}';
				} else if (xdata.indexOf(para) === 2) {
					str += '{d|' + pct + '%}';
				} else if (xdata.indexOf(para) === 3) {
					str += '{e|' + pct + '%}';
				}
				return str;
			},
			textStyle: {
				rich: {
					a: {
						width: getSize(1.4),
						//padding: [0, 5, 0, 0],
						fontSize: getSize(0.24),
						color: '#fff'
					},
					b: {
						width: getSize(1.5),
						fontSize: getSize(0.24),
						color: '#fff'
						//color: colorArr[0]
					},
					c: {
						width: getSize(1.5),
						fontSize: getSize(0.24),
						color: '#fff'
						//color: colorArr[1]
					},
					d: {
						width: getSize(1.5),
						fontSize: getSize(0.24),
						color: '#fff'
						//color: colorArr[2]
					},
					e: {
						width: getSize(1.5),
						fontSize: getSize(0.24),
						color: '#fff'
						//color: colorArr[3]
					},
				}
			},
			orient: 'vertical',
			data: legendArr
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: true,
			center: ['32%', '50%'],
			radius: ['60%', '80%'],
			startAngle: 90,
			itemStyle: {
				borderWidth: 3,
				borderColor: '#f3f3f3'
			},
			label: {
				show: false,
				position: 'center',
				formatter: '{a|21114}\n{b|' + dw + '}',
				rich: {
					a: {
						fontSize: getSize(0.63),
						padding: [10, 0, 0, 0],
						color: '#FEFEFD'
					},
					b: {
						fontSize: getSize(0.4),
						color: '#FEFEFD'
					}
				}
			},
			data: dataArr
		}]
	}
	mychart.clear();
	mychart.setOption(option);
}

var chart_pie_5 = function (pxdata, pydata, unit) {
	var myChart = echarts.init(document.getElementById('chart_pie_5'));
	var nameArr = pxdata || ['大盛村', '深里村', '芳树村', '四堡村', '剡溪村'];
	var valueArr = pydata || S_mock.array(nameArr.length, 100, 200);
	var colorArr = ['#3e8bfe', '#ecca2b', '#f44786', '#2ed892', '#1cdced'];
	var dw = unit || '户';
	var echartData = [];
	var echartData2 = [];
	for (var key in nameArr) {
		echartData.push({
			name: nameArr[key],
			value: valueArr[key],
			itemStyle: {
				color: colorArr[key],
			},
		});
		echartData2.push({
			name: nameArr[key],
			value: valueArr[key],
			itemStyle: {
				color: 'rgba(255,255,255,0.6)',
			},
		})
	}
	option = {
		tooltip: {
			trigger: 'item',
			formatter: '{b}:{c}（' + dw + '）'
		},
		legend: {
			orient: 'vertical',
			icon: 'circle',
			x: '65%',
			y: 'center',
			itemWidth: getSize(0.15),
			itemHeight: getSize(0.15),
			itemGap: getSize(0.3),
			align: 'left',
			//selectedMode: false,
			formatter: function (para) {
				var pct = valueArr[nameArr.indexOf(para)];
				var str = '{a|' + para + '}';
				if (nameArr.indexOf(para) === 0) {
					str += '{b|' + pct + '户}';
				} else if (nameArr.indexOf(para) === 1) {
					str += '{c|' + pct + '户}';
				} else if (nameArr.indexOf(para) === 2) {
					str += '{d|' + pct + '户}';
				} else if (nameArr.indexOf(para) === 3) {
					str += '{e|' + pct + '户}';
				} else if (nameArr.indexOf(para) === 4) {
					str += '{f|' + pct + '户}';
				}
				return str;
			},
			textStyle: {
				color: '#fff',
				rich: {
					a: {
						//padding: [0, 5, 0, 0],
						fontFamily: 'PingFang SC',
						fontSize: getSize(0.26),
					},
					b: {
						fontSize: getSize(0.26),
						//color: colorArr[0]
					},
					c: {
						fontSize: getSize(0.26),
						//color: colorArr[1]
					},
					d: {
						fontSize: getSize(0.26),
						//color: colorArr[2]
					},
					e: {
						fontSize: getSize(0.26),
						//color: colorArr[3]
					},
					f: {
						fontSize: getSize(0.26),
						//color: colorArr[3]
					}
				}
			},
		},
		series: [{
				name: '',
				type: 'pie',
				radius: ['50%', '80%'],
				center: ['40%', '50%'],
				legendHoverLink: false,
				avoidLabelOverlap: false,
				tooltip: {
					show: false
				},
				label: {
					align: 'center',
					normal: {
						show: false,
						position: 'center',
						formatter: function (data) {
							// 设置圆饼图中间文字排版
							// return data.value + '\n' + data.name;
							return '{value|' + data.value + dw + '}\n{name|' + data.name + '}';
						},
					},
					emphasis: {
						show: true, //文字至于中间时，这里需为true
						textStyle: {
							rich: {
								name: {
									color: '#ecca2b',
									fontSize: getSize(0.26),
								},
								value: {
									color: '#fff',
									padding: [5, 0, 5, 0],
									fontSize: getSize(0.26),
								},
							},
						},
					},
				},
				itemStyle: {
					normal: {
						label: {
							show: false,
						},
						labelLine: {
							show: false,
						},
						shadowBlur: 10,
						shadowColor: 'rgba(142, 152, 241, 0.6)',
					},
				},
				data: echartData,
				hoverAnimation: false,
			},
			{
				name: '',
				type: 'pie',
				radius: ['50%', '65%'],
				center: ['40%', '50%'],
				avoidLabelOverlap: false,
				// label: {
				// 	align: 'center',
				// 	normal: {
				// 		show: false,
				// 		position: 'center',
				// 		formatter: function(data) {
				// 			// 设置圆饼图中间文字排版
				// 			// return data.value + '\n' + data.name;
				// 			return '{value|' + data.value + dw + '}\n{name|' + data.name + '}';
				// 		},
				// 	},
				// 	emphasis: {
				// 		show: true, //文字至于中间时，这里需为true
				// 		textStyle: {
				// 			rich: {
				// 				name: {
				// 					color: '#ecca2b',
				// 					fontSize: getSize(0.26),
				// 				},
				// 				value: {
				// 					color: '#fff',
				// 					padding: [5, 0, 5, 0],
				// 					fontSize: getSize(0.26),
				// 				},
				// 			},
				// 		},
				// 	},
				// },
				itemStyle: {
					normal: {
						label: {
							show: false,
						},
						labelLine: {
							show: false,
						},
					},
				},
				data: echartData2,
				hoverAnimation: false,
			},
		],
	};

	myChart.setOption(option);
	myChart.resize();
	var index;

	//设置默认选中高亮部分
	//myChart.dispatchAction({
	//type: 'highlight',
	//seriesIndex: 0,
	//dataIndex: 0
	//});
	// 当鼠标移入时，如果不是第一项，则把当前项置为选中，如果是第一项，则设置第一项为当前项
	// myChart.on('mouseover', function(e) {
	// 	myChart.dispatchAction({
	// 		type: 'downplay',
	// 		seriesIndex: 0,
	// 		dataIndex: 0
	// 	});
	// 	if(e.dataIndex != index) {
	// 		myChart.dispatchAction({
	// 			type: 'downplay',
	// 			seriesIndex: 0,
	// 			dataIndex: index
	// 		});
	// 	}
	// 	if(e.dataIndex == 0) {
	// 		myChart.dispatchAction({
	// 			type: 'highlight',
	// 			seriesIndex: 0,
	// 			dataIndex: e.dataIndex
	// 		});
	// 	}
	// });

	// //当鼠标离开时，把当前项置为选中
	// myChart.on('mouseout', function(e) {
	// 	index = e.dataIndex;
	// 	myChart.dispatchAction({
	// 		type: 'highlight',
	// 		seriesIndex: 0,
	// 		dataIndex: e.dataIndex
	// 	});
	// });
};

var chart_pie_6 = function (pxdata, pydata, pxdata2, pydata2) {
	var colorArr = ["#326AF5", "#FD7E5B", "#44DCF3"];
	var nameArr = pxdata || ["待办理", "已办理", "办理中"];
	var valueArr = pydata || S_mock.array(nameArr.length, 100, 200);
	var colorArr2 = ["#05D370", "#DB5146"];
	var nameArr2 = pxdata2 || ["按时", "超期"];
	var valueArr2 = pydata2 || S_mock.array(nameArr2.length, 100, 200);
	var dataArr = [];
	var dataArr2 = [];
	var legendArr = [];
	var legendAll = [];
	var valueAll = [];
	var rateArr = [];
	var valueTotal1 = getArrSum(valueArr);
	var valueTotal2 = getArrSum(valueArr2);
	var pct;
	for (var i = 0; i < nameArr.length; i++) {
		dataArr.push({
			name: nameArr[i],
			value: valueArr[i],
			itemStyle: {
				normal: {
					color: colorArr[i]
				},
			},
		});
		legendAll.push(nameArr[i]);
		valueAll.push(valueArr[i]);
		pct = ((valueArr[i] / valueTotal1) * 100).toFixed(2);
		rateArr.push(pct);
		legendArr.push({
			name: nameArr[i],
		});
	}
	for (var i = 0; i < nameArr2.length; i++) {
		dataArr2.push({
			name: nameArr2[i],
			value: valueArr2[i],
			itemStyle: {
				normal: {
					color: colorArr2[i]
				},
			},
		});
		legendAll.push(nameArr2[i]);
		valueAll.push(valueArr2[i]);
		pct = ((valueArr2[i] / valueTotal2) * 100).toFixed(2);
		rateArr.push(pct);
		legendArr.push({
			name: nameArr2[i],
		});
	}
	var mychart = echarts.init(document.getElementById("chart_pie_6"));
	var option = {
		tooltip: {
			trigger: "item",
			formatter: "{b}占比:{d}%",
		},
		legend: {
			y: "center",
			x: "60%",
			icon: "circle",
			itemWidth: getSize(0.12),
			itemHeight: getSize(0.12),
			itemGap: getSize(0.3),
			textStyle: {
				padding: [getSize(0.1), 0, 0, 0],
				rich: {
					a: {
						fontSize: getSize(0.28),
						color: "#fff",
					},
					b: {
						fontSize: getSize(0.24),
						color: "#f9cd34",
					},
					c: {
						fontSize: getSize(0.24),
						color: "#326af5",
					},
				},
			},
			formatter: function (para) {
				var str = "{a|" + para + "} {b|";
				//console.log(rateArr + ':www')
				str += valueAll[legendAll.indexOf(para)] + "}{c|（" + rateArr[legendAll.indexOf(para)] + "%）}";
				if ((para = "其他")) {
					str = str.replace(/其他/, "其他");
				}
				return str;
			},
			orient: "vertical",
			data: legendArr,
		},
		series: [{
				type: "pie",
				center: ["30%", "50%"],
				radius: ["40%", "60%"],
				itemStyle: {
					normal: {
						label: {
							show: false,
							fontSize: 12,
							fontFamily: "DIN",
							formatter: "{b}",
						},
						labelLine: {
							show: false,
						},
					},
				},
				data: dataArr2,
			},
			{
				name: "课题统计",
				type: "pie",
				radius: ["80%", "100%"],
				center: ["30%", "50%"],
				itemStyle: {
					normal: {
						label: {
							show: false,
							fontSize: 12,
							fontFamily: "DIN",
							formatter: "{b}",
						},
						labelLine: {
							show: false,
						},
					},
				},
				data: dataArr,
			},
		],
	};
	mychart.setOption(option);
};

var chart_pie_7 = function (pxdata, pxdata2, pydata, pydata2) {
	var colorArr = [
		[{
				offset: 0,
				color: "rgba(246, 197, 2, 0.05)" // 0% 处的颜色
			},
			{
				offset: 1,
				color: "#F6C502" // 100% 处的颜色
			}
		],
		[{
				offset: 0,
				color: "rgba(40, 242, 230, 0.05)" // 0% 处的颜色
			},
			{
				offset: 1,
				color: "#28F2E6" // 100% 处的颜色
			}
		],
		[{
				offset: 0,
				color: "rgba(255, 102, 0, 0.05)" // 0% 处的颜色
			},
			{
				offset: 1,
				color: "#FF6600" // 100% 处的颜色
			}
		]
	];
	var nameArr = pxdata || ["已办理", "办理中", '待办理'];
	var valueArr = pydata || S_mock.array(nameArr.length, 100, 200);
	var colorArr2 = [
		[{
				offset: 0,
				color: "rgba(33, 79, 229, 0.05)" // 0% 处的颜色
			},
			{
				offset: 1,
				color: "#214FE5" // 100% 处的颜色
			}
		],
		[{
				offset: 0,
				color: "rgba(194, 215, 253, 0.05)" // 0% 处的颜色
			},
			{
				offset: 1,
				color: "#C2D7FD" // 100% 处的颜色
			}
		]
	];
	var valueArr2 = pydata2 || S_mock.array(2, 100, 200);
	var nameArr2 = pxdata2 || ["按时", "超期"];
	var dataArr = [];
	var dataArr2 = [];
	var legendArr = [];
	for (var i = 0; i < nameArr.length; i++) {
		dataArr.push({
			name: nameArr[i],
			value: valueArr[i],
			itemStyle: {
				normal: {
					color: {
						type: "linear",
						x: 0,
						y: 0,
						x2: 0,
						y2: 1,
						colorStops: colorArr[i > 8 ? Math.floor(Math.random() * 8 + 1) : i],
						global: false // 缺省为 false
					}
				},
			},
		});
		legendArr.push({
			icon: "rect",
			name: nameArr[i],
		});
	}
	for (var i = 0; i < nameArr2.length; i++) {
		dataArr2.push({
			name: nameArr2[i],
			value: valueArr2[i],
			itemStyle: {
				normal: {
					color: {
						type: "linear",
						x: 0,
						y: 0,
						x2: 0,
						y2: 1,
						colorStops: colorArr2[i > 8 ? Math.floor(Math.random() * 8 + 1) : i],
						global: false // 缺省为 false
					}
				},
			},
		});
	}
	var mychart = echarts.init(document.getElementById("chart_pie_7"));
	var option = {
		tooltip: {
			trigger: "item",
			formatter: '{b}：\n{c}（{d}%）',
		},
		legend: {
			show: false,
			y: "center",
			right: "15%",
			itemWidth: getSize(0.4),
			itemHeight: getSize(0.24),
			itemGap: getSize(0.1),
			textStyle: {
				padding: [getSize(0.1), 0, 0, 0],
				rich: {
					a: {
						fontSize: getSize(0.28),
						color: "#fff",
					},
					b: {
						fontSize: getSize(0.24),
						color: "#facc14",
					},
					c: {
						fontSize: getSize(0.24),
						color: "#facc14",
					},
				},
			},
			formatter: function (para) {
				var str = "{a|" + para + "} {b|";
				str += valueArr[nameArr.indexOf(para)] + "}  {c|元}";
				if ((para = "其他")) {
					str = str.replace(/其他/, "其他       ");
				}
				return str;
			},
			orient: "vertical",
			data: legendArr,
		},
		series: [{
				//color: colorArr2,
				type: "pie",
				radius: ['25%', "45%"],
				center: ["50%", "50%"],
				data: dataArr2,
				itemStyle: {
					normal: {
						borderRadius: getSize(1),
						label: {
							show: true,
							//formatter: '{b}\n{d}%',
							formatter: function (params) {
								var percent = 0;
								var total = 0;
								for (var i = 0; i < valueArr2.length; i++) {
									total += valueArr2[i];
								}
								//console.log(total)
								percent = ((params.value / total) * 100).toFixed(0);
								var labelDom = '{a|' + params.name + '}\n{b|' + params.value + '}{c|' + '（' + percent + '%）}';
								return labelDom;
							},
							rich: {
								a: {
									fontSize: getSize(0.28),
									color: '#B7CFFC',
									padding: [3, 0, 0, 0]
								},
								b: {
									fontSize: getSize(0.36),
									fontFamily: "FZZYJW",
									color: '#fff',
								},
								c: {
									fontSize: getSize(0.28),
									fontFamily: "FZZYJW",
									color: '#fff',
								}
							}
						},
						labelLine: {
							show: true,
							length: getSize(1),
							length2: 0,
						},
					},
				},
			},
			{
				name: "",
				type: "pie",
				center: ["50%", "50%"],
				radius: ["65%", "85%"],
				itemStyle: {
					normal: {
						borderRadius: getSize(1),
						label: {
							show: true,
							color: '#fff',
							//formatter: '{b}\n{d}%',
							formatter: function (params) {
								var percent = 0;
								var total = 0;
								for (var i = 0; i < dataArr.length; i++) {
									total += dataArr[i].value;
								}
								percent = ((params.value / total) * 100).toFixed(0);
								var labelDom = '{a|' + params.name + '}\n{b|' + params.value + '}{c|' + '（' + percent + '%）}';
								return labelDom;
							},
							rich: {
								a: {
									fontSize: getSize(0.28),
									color: '#B7CFFC',
									padding: [3, 0, 0, 0]
								},
								b: {
									fontSize: getSize(0.36),
									fontFamily: "FZZYJW",
									color: '#fff',
								},
								c: {
									fontSize: getSize(0.28),
									fontFamily: "FZZYJW",
									color: '#fff',
								}
							}
						},
						labelLine: {
							show: true,
						},
					},
				},
				data: dataArr,
			},
		],
	};
	mychart.setOption(option);
};

var chart_pie_8 = function (pxdata, pydata, punit) {
	var colorArr = ['#bf401f', '#eea302', '#00a9d3'];
	var xdata = pxdata || ['红', '黄', '蓝'];
	var ydata = pydata || S_mock.array(xdata.length, 100, 200);
	var dw = punit || '%';
	var dataArr = [];
	var legendArr = [];
	for (var i = 0; i < xdata.length; i++) {
		dataArr.push({
			name: xdata[i],
			value: ydata[i]
		});
		legendArr.push({
			icon: 'rect',
			name: xdata[i],
		});
	}
	var mychart = echarts.init(document.getElementById('chart_pie_8'));
	var option = {
		color: colorArr,
		tooltip: {
			trigger: 'item',
			formatter: "{a} {b}: {c} ({d})" + dw
		},
		legend: {
			show: false,
			y: 'center',
			right: '15%',
			itemWidth: getSize(0.4),
			itemHeight: getSize(0.24),
			itemGap: getSize(0.1),
			textStyle: {
				padding: [getSize(0.1), 0, 0, 0],
				rich: {
					a: {
						fontSize: getSize(0.28),
						color: '#fff'
					},
					b: {
						fontSize: getSize(0.24),
						color: '#facc14'
					},
					c: {
						fontSize: getSize(0.24),
						color: '#facc14'
					}
				}
			},
			formatter: function (paras) {
				var str = '{a|' + paras + '} {b|';
				str += ydata[xdata.indexOf(paras)] + '}  {c|' + dw + '}';
				if (paras = '其他') {
					str = str.replace(/其他/, '其他       ');
				}
				return str;
			},
			orient: 'vertical',
			data: legendArr
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: false,
			center: ['50%', '50%'],
			radius: ['15%', '55%'],
			roseType: 'radius',
			startAngle: 90,
			itemStyle: {
				normal: {
					label: {
						show: true,
						fontSize: 16,
						// formatter: '{d}%',
						formatter: function (params) {
							var percent = 0;
							var total = 0;
							for (var i = 0; i < ydata.length; i++) {
								total += ydata[i];
							}
							//console.log(total)
							percent = ((params.value / total) * 100).toFixed(0);
							if (params.name === "红") {
								var labelDom = '{b|' + params.value + '}{c|' + '（' + percent + '%）}';
							} else if (params.name === "黄") {
								var labelDom = '{b|' + params.value + '}{c2|' + '（' + percent + '%）}';
							} else if (params.name === "蓝") {
								var labelDom = '{b|' + params.value + '}{c3|' + '（' + percent + '%）}';
							}
							return labelDom;
						},
						rich: {
							b: {
								fontSize: getSize(0.32),
								color: '#fff',
							},
							c: {
								fontSize: getSize(0.32),
								color: colorArr[0]
							},
							c2: {
								fontSize: getSize(0.32),
								color: colorArr[1]
							},
							c3: {
								fontSize: getSize(0.32),
								color: colorArr[2]
							}
						}
					},
					labelLine: {
						show: true
					}
				}
			},
			data: dataArr
		}],
	}
	mychart.setOption(option);

	// 取消所有高亮，只显示传入下标的高亮
	function light(index) {
		xdata.forEach(function (item) {
			mychart.dispatchAction({
				type: 'downplay',
				seriesIndex: 0,
			});
		})
		mychart.dispatchAction({
			type: 'highlight', // showTip 提示框、 highlight 高亮
			seriesIndex: 0,
			dataIndex: index
		});
	}

	// 监听鼠标悬浮时事件
	mychart.on('mouseover', function (params) {
		// console.log(params);
		light(params.dataIndex);
	});

	auto_hover(xdata.length, 1000); // 饼图循环高亮-渲染

	// 饼图循环高亮-回调
	function auto_hover(length, time) {
		var pie_hover_index = 0;
		setInterval(function () {
			if (pie_hover_index == length) {
				pie_hover_index = 0;
			}
			light(pie_hover_index);
			pie_hover_index++;
		}, time);
	}
}

var chart_gauge_1 = function (pydata, plabel) {
	var myChart = echarts.init(document.getElementById('chart_gauge_1'));
	var data = pydata || 50;
	var label = plabel || '分数';
	var option = {
		tooltip: {
			formatter: '{c}%'
		},
		series: [{
			name: '',
			type: 'gauge',
			radius: '100%',
			min: 0,
			max: 100,
			// startAngle: 180,
			// endAngle: 0,
			progress: {
				show: true,
				roundCap: true,
			},
			axisLine: { //仪表盘轴线相关配置。
				roundCap: true,
				lineStyle: {
					color: [
						[1, '#3196fa']
					]
					// width: 18
				}
			},
			axisTick: { //刻度样式
				// splitNumber: 2,
				lineStyle: {
					// width: 2,
					color: '#fff'
				}
			},
			axisLabel: { //刻度标签
				// distance: 30,
				color: '#fff',
				// fontSize: 20
				formatter: function (value) {
					if (value == 0 || value == 50 || value == 100) {
						return value;
					} else {
						return ''
					}
				}
			},
			splitLine: { //分隔线样式
				// length: 12,
				lineStyle: {
					// width: 3,
					color: '#fff'
				}
			},
			itemStyle: {
				color: '#58D9F9',
				shadowColor: 'rgba(0,138,255,0.45)',
				shadowBlur: 10,
				shadowOffsetX: 2,
				shadowOffsetY: 2
			},
			detail: {
				valueAnimation: true,
				formatter: function (value) {
					return '{a|' + value + '\n}' + '{b|' + label + '}';
				},
				color: '#fff',
				rich: {
					a: {
						color: '#fff',
						fontSize: 16
					},
					b: {
						fontSize: 14
					}
				}
			},
			data: [{
				value: data,
				// name: label
			}]
		}]
	};
	myChart.setOption(option);
};

var chart_gauge_2 = function (pname, pdata) {
	var gauge_val = {
		name: pname || "标题",
		value: pdata || S_mock.number(20, 100, true)
	};

	var mychart = echarts.init(document.getElementById('chart_gauge_2'));
	var dataArr = gauge_val.value;
	var option = {
		tooltip: {
			//formatter: "{a} <br/>{b} : {c}%"
		},
		series: [{
				name: "nei",
				type: "gauge",
				center: ['50%', '49%'],
				radius: '53%',
				splitNumber: 10,
				axisLine: {
					lineStyle: {
						color: [
							[dataArr / 100, new echarts.graphic.LinearGradient(
								0, 0, 1, 0, [{
										offset: 0,
										color: '#61B4F9',
									},
									{
										offset: 1,
										color: '#008BFF',
									}
								]
							)],
							[1, "#0a5591"]
						],
						width: 8
					}
				},
				axisLabel: {
					show: false,
				},
				axisTick: {
					show: false,

				},
				splitLine: {
					show: false,
				},
				itemStyle: {
					show: false,
				},
				detail: {
					show: false,
				},
				title: { //标题
					show: false,
				},
				data: [gauge_val],
				pointer: {
					show: true,
					length: '0%',
					radius: '0%',
					width: 0, //指针粗细
				},
				animationDuration: 4000,
			},
			{ //外圈刻度
				name: "wai",
				type: "gauge",
				center: ['50%', '49%'],
				radius: '77%',
				splitNumber: 10,
				axisLine: {
					lineStyle: {
						color: [
							[dataArr / 100, new echarts.graphic.LinearGradient(
								0, 0, 1, 0, [{
										offset: 0,
										color: '#eec345',
									},
									{
										offset: 1,
										color: '#eec345',
									}
								]
							)],
							[1, "#0a548f"]
						],
						width: 2
					}
				},
				axisLabel: {
					show: false,
				},
				axisTick: {
					show: false,

				},
				splitLine: {
					show: false,
				},
				itemStyle: {
					show: false,
				},
				detail: {
					show: true,
					formatter: dataArr + "%",
					offsetCenter: [0, 16],
					textStyle: {
						padding: [0, 0, getSize(0.1), 0],
						fontSize: getSize(0.6),
						//fontWeight: '600',
						fontFamily: 'DS-DIGI-1',
						color: '#00EAFF'
					}
				},
				title: { //标题
					show: true,
					offsetCenter: [0, getSize(2.25)], // x, y，单位px
					textStyle: {
						color: "#fff",
						padding: [0, 0, getSize(2.2), 0],
						fontSize: getSize(0.36), //表盘上的标题文字大小
						fontWeight: 400,
						//fontFamily: 'PingFangSC'
					}
				},
				data: [gauge_val],
				pointer: {
					show: true,
					length: '0%',
					radius: '0%',
					width: 0, //指针粗细
				},
				animationDuration: 4000,
			},
			{
				name: '中间刻度',
				type: 'gauge',
				center: ['50%', '49%'],
				radius: '60%',
				min: 0, //最小刻度
				max: 100, //最大刻度
				splitNumber: 7, //刻度数量
				startAngle: 225,
				endAngle: -45,
				axisLine: {
					show: true,
					lineStyle: {
						width: 0,
						color: [
							[1, 'rgba(0,0,0,0)']
						]
					}
				}, //仪表盘轴线
				axisLabel: {
					show: false,
					color: '#4d5bd1',
					distance: 25,
					formatter: function (v) {
						switch (v + '') {
							case '0':
								return '0';
							case '10':
								return '10';
							case '20':
								return '20';
							case '30':
								return '30';
							case '40':
								return '40';
							case '50':
								return '50';
							case '60':
								return '60';
							case '70':
								return '70';
							case '80':
								return '80';
							case '90':
								return '90';
							case '100':
								return '100';
						}
					}
				}, //刻度标签。
				axisTick: {
					show: true,
					splitNumber: 8,
					lineStyle: {
						color: '#31d196', //用颜色渐变函数不起作用
						width: 0.4,
					},
					length: -5
				}, //刻度样式
				splitLine: {
					show: true,
					length: -8,
					lineStyle: {
						width: 0.4,
						color: '#31d196', //用颜色渐变函数不起作用
					}
				}, //分隔线样式
				detail: {
					show: false,
				},
				pointer: {
					show: false
				}
			},
		]
	};
	mychart.clear();
	mychart.setOption(option);
	mychart.resize();
	// 监听页面大小变化 同时对图表进行resize
	window.onresize = function () {
		mychart.resize();
	}
};

var chart_gauge_3 = function (colorDom1, colorDom2, pdata, pname) {
	var gauge_val = {
		name: pname || "走访率",
		value: pdata || S_mock.number(20, 100, false)
	};
	if (gauge_val.value > 1) {
		var color_pct = parseFloat((gauge_val.value / 100).toFixed(0))
	} else {
		var color_pct = parseFloat(gauge_val.value)
	}
	var mychart = echarts.init(document.getElementById('chart_gauge_3'));
	var color_show = colorDom1 || '#ECBF3A';
	var color_bg = colorDom2 || 'rgba(236, 191, 58, 0.4)';
	var radius_arr = ['82%', '68%', '100%'];
	var center_arr = [
		['50%', '50%'],
		['50%', '50%'],
		['50%', '50%'],
		['50%', '50%'],
		['50%', '50%']
	];
	var dataArr = gauge_val.value;
	var colorSet = {
		color: '#468EFD'
	};
	var option = {
		// backgroundColor: '#043654',
		backgroundColor: '',
		tooltip: {
			formatter: "{a} <br/>{b} : {c}%"
		},
		series: [{
			name: "",
			type: "gauge",
			center: ['50%', '60%'],
			radius: '110%',
			splitNumber: 10,
			axisLine: {
				lineStyle: {
					color: [
						[dataArr / 100, new echarts.graphic.LinearGradient(
							0, 0, 1, 0, [{
									offset: 0,
									color: color_show,
								},
								{
									offset: 1,
									color: color_show,
								}
							]
						)],
						[1, color_bg]
					],
					width: 8,
					shadowBlur: 10,
					shadowColor: color_bg,
				},
			},
			axisLabel: {
				show: false,
			},
			axisTick: {
				show: false,

			},
			splitLine: {
				show: false,
			},
			itemStyle: {
				show: false,
			},
			detail: {
				show: true,
				formatter: dataArr + "%",
				offsetCenter: [0, getSize(0.3)],
				textStyle: {
					fontSize: getSize(0.5),
					fontWeight: 400,
					fontFamily: 'YouSheBiaoTiHei',
					color: color_show
				}
			},
			title: { //标题
				show: true,
				offsetCenter: [0, -getSize(0.3)], // x, y，单位px
				textStyle: {
					color: color_show,
					fontSize: getSize(0.29), //表盘上的标题文字大小
					fontWeight: 400,
					fontFamily: 'PingFangSC'
				}
			},
			data: [gauge_val],
			pointer: {
				show: false,
				length: '50%',
				radius: '30%',
				width: 4, //指针粗细
			},
			animationDuration: 4000,
		}]
	};
	mychart.setOption(option);
	mychart.resize();
	// 监听页面大小变化 同时对图表进行resize
	window.onresize = function () {
		mychart.resize();
	}
}

var chart_gauge_4 = function (dom, pdata, pname, pcolor) {
	var gauge_val = {
		name: pname || "南北国际",
		value: pdata * 1 || S_mock.number(0.1, 0.9, true)
	};
	var mychart = echarts.init(document.getElementById('chart_gauge_4'));
	var dataArr = pdata;
	var c_color = pcolor || '#00E4FF';
	var option = {
		// backgroundColor: '#043654',
		backgroundColor: '',
		tooltip: {
			confine: true,
			formatter: "{b} : {c}"
		},
		series: [{
				name: "",
				type: "gauge",
				center: ['50%', '50%'],
				radius: '62%',
				max: 1,
				progress: {
					show: true,
					roundCap: true,
				},
				splitNumber: 10,
				axisLine: {
					show: false,
					lineStyle: {
						color: [
							[dataArr, new echarts.graphic.LinearGradient(
								0, 0, 1, 0, [{
										offset: 0,
										color: '#0A52CA',
									},
									{
										offset: 1,
										color: '#02E1EF',
									}
								]
							)],
							[1, "#14306F"]
						],
						width: 8
					}
				},
				axisLabel: {
					show: false,
				},
				axisTick: {
					show: false,

				},
				splitLine: {
					show: false,
				},
				// itemStyle: {
				// 	show: false,
				// },
				itemStyle: {
					// color: '#58D9F9'
					color: new echarts.graphic.LinearGradient(
						0, 1, 0, 0, [{
								offset: 0,
								color: '#0A52CA',
							},
							{
								offset: 1,
								color: c_color,
							}
						]
					)
				},
				detail: {
					show: true,
					formatter: pdata,
					offsetCenter: [0, getSize(0.5)],
					textStyle: {
						padding: [0, 0, 0, 0],
						fontSize: getSize(0.48),
						fontWeight: '700',
						fontFamily: 'DS-DIGI-1',
						color: '#15FEFB'
					}
				},
				title: { //标题
					show: true,
					offsetCenter: [0, getSize(1)], // x, y，单位px
					textShadowColor: '#4D85C0',
					textShadowBlur: 5,
					color: '#fff',
					fontSize: getSize(0.36), //表盘上的标题文字大小
					fontFamily: 'PangMenZhengDao',
					textStyle: {
						// fontWeight: 400,

					}
				},
				data: [gauge_val],
				pointer: {
					show: true,
					length: '50%',
					radius: '30%',
					width: 4, //指针粗细
				},
				animationDuration: 4000,
			},
			{
				name: '外部刻度',
				type: 'gauge',
				center: ['50%', '50%'],
				radius: '90%',
				min: 0, //最小刻度
				max: 100, //最大刻度
				splitNumber: 7, //刻度数量
				startAngle: 225,
				endAngle: -45,
				axisLine: {
					show: true,
					lineStyle: {
						width: 1,
						color: [
							[1, 'rgba(0,0,0,0)']
						]
					}
				}, //仪表盘轴线
				axisLabel: {
					show: false,
					color: '#4d5bd1',
					distance: 25,
					formatter: function (v) {
						switch (v) {
							case 0.99:
								return '99';
						}
					}
				}, //刻度标签。
				axisTick: {
					show: true,
					splitNumber: 8,
					lineStyle: {
						color: '#3BF6A9', //用颜色渐变函数不起作用
						width: 0.5,
					},
					length: -7
				}, //刻度样式
				splitLine: {
					show: true,
					length: -11,
					lineStyle: {
						width: 0.5,
						color: '#3BF6A9', //用颜色渐变函数不起作用
					}
				}, //分隔线样式
				detail: {
					show: false,
				},
				pointer: {
					show: false
				}
			},
		]
	};
	mychart.setOption(option);
}

var chart_gauge_5 = function (ptype, pdata, alldata, pname) {
	var getvalue = [pdata || 15];
	var name = pname || '当前进度';
	var allvalue = alldata || 20;
	var mychart = echarts.init(document.getElementById('chart_gauge_5'));
	var circleType = ptype || 1;
	if (circleType == 1) {
		var colorArr = [{
			circleBg: '#FEF0ED', // 背景颜色
			color1: '#FFB090', // 渐变颜色1
			color2: '#F7553B', // 渐变颜色2
		}]

	} else if (circleType == 2) {
		var colorArr = [{
			circleBg: '#F1F8FF', // 背景颜色
			color1: '#79BAFF', // 渐变颜色1
			color2: '#3A78F2', // 渐变颜色2
		}]
	}
	var option = {
		title: {
			text: getvalue + '/' + allvalue,
			textStyle: {
				color: '#fff',
				fontSize: 32,
				fontWeight: 400,
			},
			// subtext: name,
			// subtextStyle: {
			//     color: '#333',
			//     fontSize: 14
			// },
			itemGap: 10,
			left: 'center',
			top: '43%'
		},
		tooltip: {
			formatter: function (params) {
				return '<span style="color: #333;">' + name + '：' + getvalue + '/' + allvalue + '</span>';
			}
		},
		angleAxis: {
			max: allvalue,
			clockwise: true, // 逆时针
			// 隐藏刻度线
			show: false
		},
		radiusAxis: {
			type: 'category',
			show: true,
			axisLabel: {
				show: false,
			},
			axisLine: {
				show: false,

			},
			axisTick: {
				show: false
			},
		},
		polar: {
			center: ['50%', '50%'],
			radius: '150%' //图形大小
		},
		series: [{
				stack: 'ring', // 末尾增加点
				type: 'bar',
				data: getvalue,
				showBackground: true,
				backgroundStyle: {
					color: colorArr[0].circleBg,
				},
				coordinateSystem: 'polar',
				roundCap: true,
				barWidth: 26,
				itemStyle: {
					normal: {
						opacity: 1,
						color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0,
							color: colorArr[0].color1
						}, {
							offset: 1,
							color: colorArr[0].color2
						}]),
						shadowBlur: 5,
						shadowColor: colorArr[0].color2,
					}
				},
			},
			{
				stack: 'ring', // 末尾增加点
				type: 'bar',
				data: [0.02],
				silent: true,
				itemStyle: {
					color: '#fff',
					// shadowBlur: 8,
					// shadowColor: '#28e9f6',
				},
				coordinateSystem: 'polar',
				roundCap: true,
				barWidth: 8,
			},
		]
	};
	mychart.setOption(option);
}

var chart_gauge_6 = function (pdata) {
	var myChart = echarts.init(document.getElementById('chart_gauge_6'));
	var option = {
		series: [,
			{
				name: '外部刻度',
				type: 'gauge',
				center: ['50%', '70%'], // 默认全局居中
				radius: '135%',
				min: 0, //最小刻度
				max: 100, //最大刻度
				splitNumber: 4, //刻度数量
				startAngle: 200,
				endAngle: -20,
				axisLine: {
					show: true,
					lineStyle: {
						width: 1,
						color: [
							[1, 'rgba(0,0,0,0)']
						]
					}
				}, //仪表盘轴线
				axisLabel: {
					show: false,
					color: '#4d5bd1',
					distance: 25,
					formatter: function (v) {
						switch (v) {
							case 0.99:
								return '99';
						}
					}
				}, //刻度标签。
				axisTick: {
					show: true,
					splitNumber: 8,
					lineStyle: {
						color: '#1A6DE5', //用颜色渐变函数不起作用
						width: 0.5,
					},
					length: 4
				}, //刻度样式
				splitLine: {
					show: true,
					length: 2,
					lineStyle: {
						width: 0.5,
						color: '#1A6DE5', //用颜色渐变函数不起作用
					}
				}, //分隔线样式
				detail: {
					show: false,
				},
				pointer: {
					show: false
				}
			}, {
				name: '',
				type: 'gauge',
				min: 0,
				max: 100,
				center: ['50%', '70%'], // 默认全局居中
				splitNumber: 4,
				radius: '140%',
				startAngle: 200,
				endAngle: -20,
				axisLine: { // 坐标轴线
					lineStyle: { // 属性lineStyle控制线条样式
						color: [
							[0.25, 'rgba(26, 109, 229, 0.3)'],
							[0.5, 'rgba(26, 109, 229, 0.6)'],
							[0.75, 'rgba(26, 109, 229, 0.9)'],
							[1, '#1A6DE5']
						],
						width: 5,
					}
				},
				axisLabel: { // 坐标轴小标记
					show: true,
					distance: 3,
					formatter: function (value) {
						return value + '%'
					},
					textStyle: { // 属性lineStyle控制线条样式
						color: '#8DABC4',
						fontSize: 8,
					}
				},
				axisTick: { // 坐标轴小标记
					length: 0, // 属性length控制线长
					splitNumber: 11,
					lineStyle: { // 属性lineStyle控制线条样式
						color: 'auto',
						width: 15,
					}
				},
				splitLine: { //橙色分割线-->
					show: true,
					length: 10,
					lineStyle: {
						width: 0,
						color: '#fff',
					}
				},
				pointer: { // 分隔线
					shadowColor: 'auto', //默认透明
					shadowBlur: 2,
					length: '60%',
					width: "1",
				},
				itemStyle: {
					color: '#1A6DE5',
					borderColor: "#1A6DE5",
					borderWidth: 1
				},
				detail: {
					show: false,
					formatter: '{value}%',
					offsetCenter: ['0', '70%'],
					color: '#20D4E7',
					fontWeight: 'bold',
					// fontSize: getSize(0.35)
				},
				data: [{
					value: 70
				}]
			}, { //指针外环
				type: 'pie',
				hoverAnimation: false,
				legendHoverLink: false,
				center: ['50%', '70%'],
				radius: ['9%', '15%'],
				z: 10,
				label: {
					normal: {
						show: false
					}
				},
				labelLine: {
					normal: {
						show: false
					}
				},
				data: [{
					value: 100,
					itemStyle: {
						normal: {
							color: "#1A6DE5",
						}
					}
				}]
			},
			{ //指针内环
				type: 'pie',
				hoverAnimation: false,
				legendHoverLink: false,
				center: ['50%', '70%'],
				radius: ['0%', '8%'],
				z: 10,
				label: {
					normal: {
						show: false
					}
				},
				labelLine: {
					normal: {
						show: false
					}
				},
				data: [{
					value: 100,
					itemStyle: {
						normal: {
							color: "#FFFFFF"
						}
					}
				}]
			}
		]
	};
	//图表显示
	myChart.setOption(option);
	myChart.resize();
	$(window).resize(function () {
		myChart.resize();
	});
}

var chart_water_1 = function (pdata) {
	var mychart = echarts.init(document.getElementById('chart_water_1'));
	var value = pdata || 0.7152;
	var data = [];
	data.push(value);
	var option = {
		series: [{
			type: 'liquidFill',
			data: data,
			radius: '80%',
			amplitude: '10%',
			waveLength: '100%',
			color: '#0090FF',
			outline: {
				show: true,
				borderDistance: 4,
				itemStyle: {
					color: 'transparent',
					borderColor: '#0090FF',
					borderWidth: 1,
					shadowBlur: 0,
					shadowColor: ' rgba(255,0,0,1)'
				}
			},
			backgroundStyle: {
				color: 'transparent'
			},
			label: {
				show: true,
				formatter: (value * 100) + '%',
				fontSize: getSize(0.5),
				color: '#facc14',
				insideColor: '#facc14',
				fontWeight: 'normal',
			},
			itemStyle: {
				shadowBlur: 0,
				color: '#0090FF',
			}
		}]
	}
	mychart.setOption(option);
}

var chart_water_2 = function (pvalue) {
	var myChart = echarts.init(document.getElementById('chart_water_2'));
	var value = pvalue || 0.5;
	var data = [];
	data.push(value);
	var option = {
		series: [{
			type: "liquidFill",
			waveAnimation: true,
			animation: false,
			radius: "80%",
			center: ["50%", "50%"],
			data: data,
			itemStyle: {
				shadowBlur: 0,
				color: {
					type: "linear",
					x: 0,
					y: 0,
					x2: 0,
					y2: 1,
					colorStops: [{
							offset: 1,
							color: "rgba(255,200,111,1)",
						},
						{
							offset: 0.5,
							color: "rgba(255,200,111,0.7)",
						},
					],
					globalCoord: false,
				},
			},
			backgroundStyle: {
				borderWidth: 2,
				borderColor: "#fff",
				color: "#fff",
			},
			outline: {
				borderDistance: 2,
				itemStyle: {
					borderWidth: 6,
					borderColor: "#f2f7fb",
					shadowBlur: 0,
				},
			},
			label: {
				show: true,
				formatter: (value * 100) + '%',
				fontSize: getSize(0.5),
				color: '#facc14',
				insideColor: '#facc14',
				fontWeight: 'normal',
			},
		}, ],
	};
	myChart.setOption(option);
}

var chart_word_1 = function (pdata) {
	var chart = echarts.init(document.getElementById('chart_word_1'));
	var name_arr = ['优质教育', '强农惠农', '环境治理', '便捷交通', '小区改造', '最多跑一次', '城市建设', '通讯服务', '基层减负', '舒心就医'];
	var value_data = S_mock.array(name_arr.length, 7, 10);
	var seri_data = name_arr.map((x, i) => ({
		name: x,
		value: value_data[i],
		// textStyle: {
		//     color: '#fff'
		// }
	}));
	var option = {
		tooltip: {},
		series: [{
			type: 'wordCloud',
			gridSize: 2,
			sizeRange: [14, 20],
			rotationRange: [-90, 90],
			shape: 'circle',
			// shape: 'pentagon',
			left: 'center',
			top: 'center',
			width: '90%',
			height: '90%',
			drawOutOfBound: true,
			textStyle: {
				color: function () {
					return 'rgb(' + [
						Math.round(Math.random() * 160),
						Math.round(Math.random() * 160),
						Math.round(Math.random() * 160)
					].join(',') + ')';
				}
			},
			emphasis: {
				textStyle: {
					color: 'red',
					shadowBlur: 10,
					shadowColor: '#333'
				}
			},
			data: seri_data
		}]
	};

	chart.setOption(option);
	window.onresize = chart.resize;
}

var chart_word_2 = function (pxdata, pydata) {
	var chart = echarts.init(document.getElementById('chart_word_2'));
	var xdata = pxdata || S_mock.xdata(1, 80, '关键词');
	var ydata = pydata || S_mock.array(xdata.length, 30, 32);

	var data = [];
	for (var name in xdata) {
		data.push({
			name: xdata[name],
			value: ydata[name]
		})
	}

	var maskImage = new Image();

	var option = {
		tooltip: {},
		series: [{
			type: 'wordCloud',
			sizeRange: [10, 20],
			rotationRange: [-90, 90],
			rotationStep: 45,
			gridSize: 2,
			shape: 'pentagon',
			maskImage: maskImage,
			drawOutOfBound: false,
			textStyle: {
				color: function () {
					return 'rgb(' + [
						Math.round(Math.random() * 160),
						Math.round(Math.random() * 160),
						Math.round(Math.random() * 160)
					].join(',') + ')';
				}
			},
			emphasis: {
				textStyle: {
					color: 'red'
				}
			},
			data: data
		}]
	};

	maskImage.onload = function () {
		option.series[0].maskImage
		chart.setOption(option);
	}

	maskImage.src = './assets/img/logo.png';

	window.onresize = function () {
		chart.resize();
	}
}

var chart_radar_1 = function (pxdata, pydata1, pydata2) {
	var mychart = echarts.init(document.getElementById('chart_radar_1'));
	var color_arr = ['#05EAFF', '#FACC14'];
	var xdata = pxdata || ['岗位赋分', '奖惩加减分', '专班计分', '模块评分', '组织积分']
	var legend_arr = pxdata || ['得分情况', '满分线'];
	var ydata1 = pydata1 || S_mock.array(xdata.length, 50, 60);
	var ydata2 = pydata2 || S_mock.array(xdata.length, 70, 80);
	var indicator_arr = [];
	for (const key in xdata) {
		indicator_arr.push({
			name: xdata[key],
			max: 100
		})
	}
	var option = {
		color: color_arr,
		tooltip: {
			show: false,
			trigger: 'item'
		},
		grid: {
			top: '23%'
		},
		// backgroundColor: '#17316a',
		legend: {
			show: true,
			right: '2%',
			y: '3%',
			itemWidth: getSize(0.42),
			itemHeight: getSize(0.04),
			icon: 'rect',
			itemGap: getSize(0.2),
			orient: "vertical", // vertical , horizontal
			data: legend_arr,
			textStyle: {
				fontSize: getSize(0.28),
				color: '#fff'
			},
		},
		radar: {
			// shape: 'circle',
			name: {
				formatter: function (value, indicator) {
					var value1 = ydata1[xdata.indexOf(value)];
					var value2 = ydata2[xdata.indexOf(value)];
					//return value + '\n' + '{a|' + value1 + '}{b|/' + value2 + '家}';
					return value + '\n' + '{a|' + value1 + '}';
				},
				textStyle: {
					color: '#ffffff',
					fontSize: getSize(0.36),
					textAlign: 'center'
				},
				rich: {
					a: {
						fontWeight: 'bold',
						fontSize: getSize(0.32),
						color: '#05EAFF'
					},
					b: {
						fontSize: getSize(0.3),
						color: '#FACC14'
					}
				}
			},
			radius: '68%',
			center: ['50%', '60%'],
			axisLine: {
				lineStyle: {
					color: '#61858c'
				}
			},
			splitLine: {
				lineStyle: {
					color: '#61858c'
				}
			},
			splitArea: {
				show: false
			},
			indicator: indicator_arr
		},
		series: [{
			name: '',
			type: 'radar',
			data: [{
					value: ydata1,
					name: legend_arr[0],
					areaStyle: {
						normal: {
							color: '#05EAFF',
							opacity: 0.2
						}
					}
				},
				{
					value: ydata2,
					name: legend_arr[1],
					areaStyle: {
						normal: {
							color: '#FACC14',
							opacity: 0.2
						},
					},
				}
			]
		}]
	}
	mychart.setOption(option);
}

var chart_graph_1 = function (params) {
	var chart = echarts.init(document.getElementById('chart_graph_1'));
	var color_arr = ['#975C6E', '#FDB969', '#1489A7']
	var option = {
		backgroundColor: '#243C64',
		title: {
			text: 'Graph 简单示例'
		},
		tooltip: {
			show: false
		},
		animationDurationUpdate: 1500,
		animationEasingUpdate: 'quinticInOut',
		series: [{
			type: 'graph',
			layout: 'none',

			symbolSize: 70,
			roam: true,
			label: {
				show: true,
				fontSize: 18
			},
			edgeSymbol: ['', 'arrow'],
			edgeSymbolSize: [4, 10],
			edgeLabel: {
				fontSize: 20
			},
			data: [{
				name: '出生',
				x: 350,
				y: 150,
				symbol: 'image://./assets/img/c1.png',
				label: {
					show: false
				}
			}, {
				name: '退休',
				x: 300,
				y: 300
			}, {
				name: '救助',
				x: 350,
				y: 450
			}, {
				name: '2.0一件事',
				x: 600,
				y: 300
			}],
			// itemStyle: {
			// 	color:'rgba(40,60,100,0.8)',
			// 	borderColor: {
			// 		type: 'linear',
			// 		x: 0,
			// 		y: 0,
			// 		x2: 0,
			// 		y2: 1,
			// 		colorStops: [{
			// 			offset: 0,
			// 			color: 'red' // 0% 处的颜色
			// 		}, {
			// 			offset: 1,
			// 			color: 'blue' // 100% 处的颜色
			// 		}],
			// 		global: false // 缺省为 false
			// 	}
			// },
			// links: [],
			links: [{
				source: '出生',
				target: '2.0一件事',
				lineStyle: {
					color: color_arr[0],
					curveness: 0.2
				}
			}, {
				source: '退休',
				target: '2.0一件事',
				lineStyle: {
					color: color_arr[1],
					curveness: 0.1
				}
			}, {
				source: '救助',
				target: '2.0一件事',
				lineStyle: {
					color: color_arr[2],
					curveness: -0.2
				}
			}],
			lineStyle: {
				opacity: 0.9,
				width: 2,
				curveness: 0
			}
		}]
	};
	chart.setOption(option);
}

var pie_3d_1 = function (pxdata, pydata) {
	var name_arr = pxdata || ['企业类', '群众类', '基层类', '重点项目类', '其他类'];
	var data_arr = pydata || S_mock.array(name_arr.length, 100, 200);
	var color_arr = ['#ff6b31', '#82fbe9', '#4fdaf7', '#ffc412', '#0780dd'];
	var seri_data = [];
	for (var key in name_arr) {
		seri_data.push([name_arr[key], data_arr[key]])
	}
	var chart = Highcharts.chart('pie_3d_1', {
		colors: color_arr,
		chart: {
			type: 'pie',
			options3d: {
				enabled: true,
				alpha: 55,
				beta: 0,
				fitToPlot: true,
			},
			backgroundColor: 'transparent'
		},
		credits: {
			enabled: false
		},
		title: {
			text: ''
		},
		tooltip: {
			enabled: true,
			pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
		},
		plotOptions: {
			pie: {
				allowPointSelect: true,
				cursor: 'pointer',
				depth: 45,
				dataLabels: {
					enabled: true,
					useHTML: true, // 使用html标签时开启
					//format: '{his.series.name}: <b>{point.percentage:.1f}%</b>'
					formatter: function () {
						//console.log(this)
						var piePoint = '<div class="constitute_name">' + this.key + '</div><div class="constitute_num">' + this.y + '（<span>' + ((this.y / this.total) * 100).toFixed(1) + "%</span>）</div>";
						//console.log(piePoint + 'piePoint')
						return piePoint
					},
					style: {
						fontWeight: 'normal',
						fontSize: getSize(0.22),
					},
				},
				showInLegend: true
			}
		},
		legend: {
			enabled: false,
			verticalAlign: 'middle',
			align: 'right',
			layout: 'vertical', // vertical,horizontal
			squareSymbol: false,
			symbolHeight: getSize(0.4),
			symbolWidth: 5,
			symbolRadius: 0,
			userHTML: true,
			labelFormatter: function () {
				return '<span class="chart_name">' + this.name + '</span>' + ' <span class="chart_num">' + this.y + '</span>';
			},
			itemStyle: {
				color: '#FACC14',
				fontWeight: 'normal',
				fontSize: getSize(0.36)
			},
			itemHoverStyle: {
				color: '#ccc'
			}
		},
		series: [{
			type: 'pie',
			name: '',
			center: ["50%", "32%"],
			data: seri_data,
			size: '150%',
			dataLabels: {
				distance: 20,
				enabled: true,
				shadow: false,
				borderWidth: 0,
				color: '#fff'
			}
		}]
	});
};

function pie_3d_2(pxdata, pydata, punit) {
	var each = Highcharts.each,
		round = Math.round,
		cos = Math.cos,
		sin = Math.sin,
		deg2rad = Math.deg2rad;
	var name_arr = pxdata || ['蓝灯', '绿灯', '黄灯'];
	var data_arr = pydata || S_mock.array(name_arr.length, 100, 200);
	var color_arr = ['#466aae', '#448b55', '#eece73', '#c84840'];
	var shapeHeight = [getSize(1), getSize(1.6), getSize(0.6)]; // 图形高度
	var dw = punit || '台';
	var seri_data = [];
	for (var key in name_arr) {
		seri_data.push({
			name: name_arr[key],
			y: data_arr[key],
			h: shapeHeight[key]
		});
	}
	Highcharts.wrap(Highcharts.seriesTypes.pie.prototype, 'translate', function (proceed) {
		proceed.apply(this, [].slice.call(arguments, 1));
		// Do not do this if the chart is not 3D
		if (!this.chart.is3d()) {
			return;
		}
		var series = this,
			chart = series.chart,
			options = chart.options,
			seriesOptions = series.options,
			depth = seriesOptions.depth || 0,
			options3d = options.chart.options3d,
			alpha = options3d.alpha,
			beta = options3d.beta,
			z = seriesOptions.stacking ? (seriesOptions.stack || 0) * depth : series._i * depth;
		z += depth / 2;
		if (seriesOptions.grouping !== false) {
			z = 0;
		}
		each(series.data, function (point) {
			var shapeArgs = point.shapeArgs,
				angle;
			point.shapeType = 'arc3d';
			var ran = point.options.h;
			shapeArgs.z = z;
			shapeArgs.depth = depth * 0.75 + ran;
			shapeArgs.alpha = alpha;
			shapeArgs.beta = beta;
			shapeArgs.center = series.center;
			shapeArgs.ran = ran;
			angle = (shapeArgs.end + shapeArgs.start) / 2;
			point.slicedTranslation = {
				translateX: round(cos(angle) * seriesOptions.slicedOffset * cos(alpha * deg2rad)),
				translateY: round(sin(angle) * seriesOptions.slicedOffset * cos(alpha * deg2rad)),
			};
		});
	});
	(function (H) {
		H.wrap(Highcharts.SVGRenderer.prototype, 'arc3dPath', function (proceed) {
			// Run original proceed method
			var ret = proceed.apply(this, [].slice.call(arguments, 1));
			ret.zTop = (ret.zOut + 0.5) / 100;
			return ret;
		});
	})(Highcharts);
	var pieChart = Highcharts.chart('pie_3d_2', {
		chart: {
			type: 'pie',
			animation: false,
			backgroundColor: 'transparent',
			events: {
				load: function () {
					var each = Highcharts.each,
						points = this.series[0].points;
					each(points, function (p, i) {
						p.graphic.attr({
							translateY: -p.shapeArgs.ran,
						});
						p.graphic.side1.attr({
							translateY: -p.shapeArgs.ran,
						});
						p.graphic.side2.attr({
							translateY: -p.shapeArgs.ran,
						});
					});
				},
				redraw: function () {
					var each = Highcharts.each,
						points = this.series[0].points;
					each(points, function (p, i) {
						p.graphic.attr({
							translateY: -p.shapeArgs.ran,
						});
						p.graphic.side1.attr({
							translateY: -p.shapeArgs.ran,
						});
						p.graphic.side2.attr({
							translateY: -p.shapeArgs.ran,
						});
					});
				},
			},
			marginRight: 0,
			marginBottom: 0,
			options3d: {
				enabled: true,
				alpha: 75,
				beta: 0,
			},
		},
		colors: color_arr,
		title: {
			text: '',
		},
		tooltip: {
			enabled: true,
			pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
		},
		plotOptions: {
			pie: {
				allowPointSelect: false,
				animation: {
					duration: 1000,
				},
				cursor: 'pointer',
				dataLabels: {
					enabled: true,
					useHTML: true, // 使用html标签时开启
					//format: '{his.series.name}: <b>{point.percentage:.1f}%</b>'
					formatter: function () {
						//console.log(this)
						var piePoint = '<div class="constitute_name">' + this.key + '</div><div class="constitute_num">' + this.y + '（<span>' + ((this.y / this.total) * 100).toFixed(1) + "%</span>）</div>";
						//console.log(piePoint + 'piePoint')
						return piePoint
					},
					style: {
						color: '#fff',
						fontWeight: 'normal',
						fontSize: getSize(0.22),
					},
				},
				showInLegend: true,
				point: {
					events: {
						select: function (e) {
							e.target.options.h = 10;
							h: getSize(0.3), pieChart.redraw();
						},
						unselect: function (e) {
							e.target.options.h = 0;
							this.h = 0;
							pieChart.redraw();
						},
					},
				},
			},
		},
		legend: {
			enabled: true,
			verticalAlign: 'top',
			align: 'center',
			layout: 'horizontal', // vertical,horizontal
			squareSymbol: false,
			symbolHeight: 5,
			symbolWidth: 5,
			symbolRadius: 0,
			userHTML: true,
			labelFormatter: function () {
				var a = '<span class="chart_name">' + this.name + '</span>' + ' <span class="chart_num">' + this.y + '</span>';
				console.log(a + 'www');
				return a;
			},
			itemStyle: {
				color: '#FACC14',
				fontWeight: 'normal',
				fontSize: getSize(0.36)
			},
			itemHoverStyle: {
				color: '#ccc'
			}
		},
		credits: {
			enabled: false,
		},
		series: [{
			type: 'pie',
			name: '百分比',
			startAngle: 170,
			innerSize: getSize(1), // 中间挖空
			depth: getSize(0.8),
			size: '100%',
			data: seri_data
		}]
	});
}

var chart_tree_1 = function (pxdata, pydata) {
	var myChart = echarts.init(document.getElementById('chart_tree_1'));
	var dataname = pxdata || ['风暴', '肺炎', '灾害', '鼠疫', '泄密', '叛逃', '严重', '危险', '重大', '紧急'];
	var datvalue = pydata || S_mock.array(dataname.length, 10, 100);
	var color = ['#065a6b', '#233561', '#13406b', '#112a3d', '#738eac', '#506a85', '#9b8578', '#68628e', '#506a85', '#3c5068'];
	var colorList = [];
	for (var i = 0; i < dataname.length; i++) {
		colorList[i] = color[i]
	}
	var data = []
	for (var i = 0; i < dataname.length; i++) {
		data.push({
			value: datvalue[i],
			name: dataname[i],
			itemStyle: {
				color: new echarts.graphic.RadialGradient(0.5, 0.5, 1, [{
					offset: 0,
					color: colorList[i]
				}, {
					offset: 1,
					color: colorList[i]
				}], false),
			},
		});
	}
	option = {
		//backgroundColor: "#000",
		title: {
			show: false,
			text: '标题',
			subtext: '',
			left: '50%',
			top: '30',
			textAlign: 'center',
			textStyle: {
				color: "#000",
				fontWeight: 'normal',
			}
		},
		tooltip: {
			trigger: 'item',
			formatter: "{b}: {c}"
		},
		series: [{
			type: 'treemap',
			width: '100%',
			height: '97%',
			top: '1%',
			roam: false, //是否开启拖拽漫游（移动和缩放）
			nodeClick: false, //点击节点后的行为,false无反应
			breadcrumb: {
				show: false
			},
			label: {
				normal: {
					show: true,
					formatter: "{b}\n{c}",
					lineHeight: getSize(0.55),
					fontSize: getSize(0.4),
					x: 'center',
					y: 'center',
					textStyle: {
						color: '#fff',
					},
				}
			},
			itemStyle: {
				color: new echarts.graphic.RadialGradient(0.5, 0.5, 1, [{
					offset: 0,
					color: '#23203B'
				}, {
					offset: 1,
					color: '#43396D'
				}], false),
				normal: {
					show: true,
					borderWidth: 3,
					borderColor: '#05203a',
					borderRadius: 3,
					// borderColor: colorList[i],
				},
				emphasis: {
					label: {
						show: true
					}
				}
			},
			data: data
		}]
	};

	myChart.setOption(option);

	myChart.on('click', function (params) { //点击事件
		// 跳转至事件列表
		window.open('./list.html?keyName=' + params.name, '_self');
	});
}


//把js代码输出到页面
function append_code(id) {
	$('#' + id).parents('.flex-item').next().find('code').html('var ' + id + ' = ' + eval(id).toString())
}

for (const key in fun_name_arr) {
	if (Object.hasOwnProperty.call(fun_name_arr, key)) {
		const element = fun_name_arr[key];
		append_code(element)
	}
}